Hilfe für LibreOffice 7.2
Zeigt einen Dialog mit einem Eingabefeld und erlaubt dem Benutzer die Eingabe einer Zeichenkette bis zur Bestätigung von OK. Die Eingabe wird in einer Variablen aufgenommen.
Die Anweisung InputBox bietet eine komfortable Möglichkeit der Eingabe über einen Dialog. Die Eingabeebene kann durch die Eingabetaste oder die Schaltfläche OK verlassen werden; die vom Anwender bis dahin eingegebene Zeichenkette wird als Funktionsergebnis zurückgegeben. Wird der Dialog hingegen mit Abbrechen verlassen, liefert InputBox eine Nullzeichenkette ("") zurück.
InputBox (Prompt As String[, Title As String[, Default As String[, xpostwips As Integer, ypostwips As Integer]]]) As String
prompt: String expression displayed as the message in the dialog box.
title: String expression displayed in the title bar of the dialog box.
default: String expression displayed in the text box as default if no other input is given.
xpostwips: Integer expression that specifies the horizontal position of the dialog. The position is an absolute coordinate and does not refer to the window of LibreOffice.
ypostwips: Integer expression that specifies the vertical position of the dialog. The position is an absolute coordinate and does not refer to the window of LibreOffice.
If xpostwips and ypostwips are omitted, the dialog is centered on the screen. The position is specified in twips.
String
Sub ExampleInputBox
Dim sText As String
sText = InputBox ("Bitte geben einen Gedanken ein: ","Lieber Benutzer")
MsgBox ( sText , 64, "Bestätigung des Gedankens")
End Sub