Edit

Share via


Prompting for Information

There are several different ways you can prompt for information from a user.

  • Use the Visual Basic InputBox function to display a dialog box with a message and an edit box. When the user clicks OK, the function returns the text that the user entered.

  • Use the Visual Basic MsgBox function to display a simple message. You can display several different command buttons and icons. This function returns a number that indicates which button was clicked.

  • Use a built-in Microsoft Word dialog boxto get user input for a specific Word feature.

  • Use a custom form to get user input. For information about adding controls to a form, see Add a control to a form.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.