|
Basic Form:
strAnswer = InputBox (strPrompt[, strTitle][, strDefault][, intXpos][, intYpos][,strHelpFile, context])
Where,
- strAnswer is the string the user types into the data field presented in the InputBox window which is displayed.
- strPrompt is the message or question presented to the user in the window. The max length of this argument is 1024 characters. NOTE: this is a required argument for the function.
- strTitle is the text that's to be displayed on the window's title bar.
- strDefault is a string which will appear in the window's data field when it first is displayed to the user.
- Together intXpos and intYpos determine the position of the InputBox window which will be displayed. intXpos is the number of twips from the left side of the form where you want the InputBox window to appear. intYpos is the number of twips from the bottom of the form where you want the InputBox window to appear.
- strHelpFile is a string that identifies the help file that should be used to provide context-sensitive help
- context is the Help context number assigned to the appropriate help topic.
Other Notes:
- The InputBox() function result should always be assigned to a string variable (i.e., strAnswer should be declared as a string via a Dim statement)
- The InputBox() function returns a zero-length string equal to "" (or Empty), if the user clicks on the Cancel button or the X in the upper righthand corner of the window generated by InputBox().
- If you neglect to specify intXpos and intYpos, VB will place the window generated byInputBox() in the center of the screen.
Go Back to Top
Return to the Visual Basic Page
|