O'Reilly logo

Excel® 2007 Power Programming with VBA by John Walkenbach

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 function

  • Allowing 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

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required