Page 264 - Excel Progamming Weekend Crash Course
P. 264
n540629 ch19.qxd 9/2/03 9:35 AM Page 239
SESSION
19
Creating Custom Dialog
Boxes with User Forms
Session Checklist
✔ Overview of user forms
✔ Adding user forms to a project
✔ Basics of user form design
✔ Form properties and methods
✔ Displaying and hiding user forms
✔ A user form example
he Excel programmer can create custom dialog boxes for use in a VBA application.
These dialog boxes, called user forms in Office, can contain all of the elements that you
T see in dialog boxes belonging to the Excel application itself as well as other Windows
applications. They provide an extremely powerful programming tool, allowing you to provide
a custom visual interface for your Excel applications. This session and the next three ses-
sions show you how to create and use user forms.
Overview of User Forms
A user form is composed of three closely related parts:
The form itself that represents the screen window with its title bar and other com-
ponents common to all windows in the Windows operating system. The form is rep-
resented by a UserForm object.
The controls on the form that comprise the visual and functional interface of the
form. Each type of control is represented by its own class.
VBA code that is part of the user form. Strictly speaking, a user form does not
always have to include code, but in most cases it does.