Userform Basics

You can use dialog boxes to request specific information from users by providing them an interface with your VBA code. Every Microsoft Windows application utilizes dialog boxes to gather information from the user, and Excel is no exception. As an example, you

PARTS OF THE VISUAL BASIC EDITOR TOOLBOX

frequently interact with the Open dialog box in Excel to select a file to open. VBA provides two standard dialog boxes: MsgBox and InputBox. See Chapter 7 for more information on working with these functions.

The Visual Basic Editor provides the option of creating custom dialog boxes that you can use with your Excel macros. These custom dialog boxes are referred to as

UserForms within the Visual Basic Editor. When you create a UserForm, you design it using the various controls available on the Toolbox.

ARROW BUTTON

ARROW BUTTON

CHECKBOX BUTTON

CHECKBOX BUTTON

OPTION BUTTON

OPTION BUTTON

TOGGLE BUTTON

TOGGLE BUTTON

MULTIPAGE BUTTON

MULTIPAGE BUTTON

LABEL BUTTON

TEXTBOX BUTTON

COMBOBOX BUTTON

LABEL BUTTON

TEXTBOX BUTTON

COMBOBOX BUTTON

SCROLLBAR BUTTON

SPINBUTTON

IMAGE BUTTON

SPINBUTTON

IMAGE BUTTON

LISTBOX BUTTON

LISTBOX BUTTON

FRAME BUTTON

FRAME BUTTON

COMMAND BUTTON

0 0

Post a comment