Funci贸 InputBox

Mostra un indicador en un di脿leg en qu猫 l'usuari pot introduir text. L'entrada s'assigna a una variable.

L'expressi贸 InputBox 茅s un c貌mode m猫tode d'introduir text a trav茅s d'un di脿leg. Confirmeu l'entrada fent clic a D'acord o prement Retorn. L'entrada es torna com a valor de retorn de la funci贸. Si tanqueu el di脿leg amb Cancel路la, InputBox torna a la cadena de longitud zero ("").

Sintaxi:


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

Par脿metres :

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

t铆tol: expressi贸 de cadena que es mostra a la barra de t铆tol del quadre de di脿leg.

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 retorn:

Cadena

Exemple :


Sub ExampleInputBox
Dim sText As String
    sText = InputBox ("Introdu茂u una frase:","Benvolgut usuari")
    MsgBox ( sText , 64, "Confirmaci贸 de frase")
End Sub

Ens cal la vostra ajuda!