Chapter 15. Advanced UserForm Techniques
In This Chapter
This chapter picks up where Chapter 14 left off. Here, you’ll find additional examples of UserForms.
Using modeless UserForms
Displaying a progress indicator
Creating a wizard — an interactive series of dialog boxes
Creating a function that emulates VBA’s
MsgBox
functionAllowing users to move UserForm controls
Displaying a UserForm with no title bar
Simulating a toolbar with a Userform
Allowing users to resize a UserForm
Handling multiple controls with a single event handler
Using a dialog box to select a color
Displaying a chart in a UserForm
Using an enhanced data form
Creating a moving tile puzzle
Most of these examples are advanced, and the majority focus on practical applications. But even the less-than-practical examples demonstrate some useful techniques.
Cross-Reference
Chapter 28 contains still more UserForm examples. Specifically, you’ll find information on how to create a UserForm on the fly.
A Modeless Dialog Box
Most dialog boxes that you encounter are modal dialog boxes, which must be dismissed from the screen before the user can do anything with the underlying application. Some dialogs, however, are modeless, which means the user can continue to work in the application while the dialog box is displayed.
To display a modeless UserForm, use a statement such as
UserForm1.Show vbModeless
The word vbModeless
is a built-in constant that ...
Get Excel® 2007 Power Programming with VBA now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.