Función InputBox

Muestra un indicador en un diálogo en el que el usuario puede introducir texto. La entrada se asigna a una variable.

La instrucción InputBox es un método adecuado para introducir texto a través de un diálogo. Confirme la entrada pulsando Aceptar o la tecla Retorno. La entrada se devuelve como valor de retorno de la función. Si se cierra el diálogo con Cancelar, InputBox devuelve una cadena de longitud cero ("").

Sintaxis:


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

Parámetros:

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

título: expresión de cadena que se muestra en la barra de título del cuadro de diálogo.

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.

Valor de retorno:

Cadena

Ejemplo:


Sub ExampleInputBox
Dim sText As String
    sTexto  = InputBox ("Escriba una frase:","Estimado usuario")
    MsgBox ( sTexto , 64, "Confirmación de frase")
End Sub

¡Necesitamos su ayuda!