
When you are designing a UserForm, you are creating what developers call the Graphical User Interface (GUI) to your application. Write a procedure (stored in a VBA module) that displays the dialog box to the user. These procedures are stored in the Code window for the UserForm object. Write event-handler procedures for the controls (for example, a macro that executes when the user clicks a button in the dialog box). Use the Properties window to modify the properties for the controls or for the UserForm itself. Controls include items such as text boxes, buttons, check boxes, and list boxes.

A UserForm object holds a single UserForm.Īdd controls to the UserForm.

To create a UserForm, you usually take the following general steps:ĭetermine how the dialog box will be used and where it will be displayed in your VBA macro.Īctivate the VBE and insert a new UserForm object. If only a few pieces of information are required (for example, a Yes/No answer or a text string), one of the techniques I describe in previous articles may do the job.īut if you need to obtain more information, you must create a UserForm.


