InputBox Function

Amuesa un indicador nun diálogu nel que l'usuariu pue introducir testu. La entrada asignar a una variable.

La instrucción InputBox ye un métodu cómodu pa introducir testu al traviés d'un diálogu. Confirme la entrada calcando Aceutar o la tecla Retorno. La entrada devuélvese como valor de torna de la función. Si zarra'l diálogu con Encaboxar, InputBox devuelve una cadena de longitud cero ("").

Syntax:


InputBox (Prompt As String[, Title As String[, Default As String[, xpostwips As Integer, ypostwips As Integer]]]) As String

Parameters:

prompt: String expression displayed as the message in the dialog box.

títulu: espresión de cadena que s'amuesa na barra de títulu del cuadru de diálogu.

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.

Return value:

Cadena

Example:


Sub ExampleInputBox
Dim sText As String
    sTestu  = InputBox ("Escriba una frase:","Envaloráu usuariu")
    MsgBox ( sTestu , 64, "Confirmación de frase")
End Sub

Please support us!