Type | Description | |||
Prompt as String | A String expression displayed as the message in the dialog box. The Prompt parameter may includes HTML format like explained bellow. | |||
Title as Variant | A String expression displayed in the title bar of the dialog box. The Title parameter may includes HTML format like explained bellow. The FitTitle property specifies whether the MessageBox or InputBox ensures that its title/caption fits the dialog's title | |||
DefaultResponse as Variant | A string expression displayed in the text box as the default response if no other input is provided. If you omit DefaultResponse, the displayed text box is empty. | |||
Image as Variant | A string expression that indicates the path to a picture file being displayed, or a string expression that stores a picture in encoded base64 format. Use the eximages tool to save your picture as base64 encoded format. | |||
X as Variant |
The X parameter could be a numeric or a string expression like follows:
The FitToScreen property specifies whether the InputBox ensures that it fits the screen ( current monitor ). | |||
Y as Variant |
The Y parameter could be a numeric or a string expression like follows:
The FitToScreen property specifies whether the InputBox ensures that it fits the screen ( current monitor ). |
Return | Description | |||
String | A string expresion that indicates the string entered by the user. If the user select cancel the Input method retrieves the DefaultResponse value. |
The following samples aligns the input box as follow ( using /COM version ):
The following samples aligns the input box as follow ( using /NET version ):
The Prompt and Title arguments support the following HTML elements:
or <font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font> gets:
The following sample asks user to enter his name:
With MsgBox1 Dim s As String s = "gBHJJGHA5MIoAEIe4AAAFAoDCAPBQlEgYGAaBUXCIwiowF8bF4fHcSHYaCI7HImlAsHZEFhQipQHIfKBOExbF4YLZEGZbJw6LZZm5jIJwolGJB7lJ7N1JQQ6QspSBEEyQpqbJwsTaNLibURcWBOGawoiwS5jWCsJFpNS7LIzXaitqsPC7W5IuxVXbBOLFlzFS5qaEuaBjHTQujQZhjbZuHTbPBPbbBQrbZiTbbhOLls7wNxBeCCKrwRujuTwVhxeC3PDwdZc12qdaafZ4JD7QRPfel3ZcfdnfaiMfBNT71L71nIPz7YJ45nLZiMfbWSb7cO0e2+exxfb26T26r2UIB8nl83n9Hp9Xr9nt93v+Hx+Xz+n1+33/H5/X7/n9/z/wBAL5oYAAQnyAgAoYf4ABZAiEweIAE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