Axuda do Collabora Office 24.04
Mostra un campo nun diálogo para que o usuario introduza texto. A entrada atribúese a unha variábel.
The InputBox statement is a convenient method of entering text through a dialog. Confirm the input by clicking OK or pressing Return. The input is returned as the function return value. If you close the dialog with Cancel, InputBox returns a zero-length string ("").
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 Collabora Office.
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 Collabora Office.
If xpostwips and ypostwips are omitted, the dialog is centered on the screen. The position is specified in twips.
Cadea
Sub ExampleInputBox
Dim sText As String
sTexto = InputBox ("Introduza unha frase: ","Prezado usuario")
MsgBox ( sTexto , 64, "Confirmación de frase")
End Sub