O'Reilly logo

Excel 2003 VBA Programmer's Reference by Robert Rosenberg, Rob Bovey, John Green, Stephen Bullen, Paul T. Kimmel

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

9

UserForms

Rows, columns, and cells represent a simple and utilitarian means of entering information but not a very engaging one. UserForms play the role of a blank slate, a palette, upon which you can create visual metaphors that permit you to engage your users in the process of entering data.

To create the visual metaphors, you add UserForms in the VBE using Insert images UserForm. The metaphor for adding a custom form is painting and the form is the blank canvas. This metaphor is supported by dragging controls from the Toolbox onto the UserForm. The forms and the controls you add to the forms already define methods, properties, and events that permit you to orchestrate the interaction between the user and the code. The visual appeal of any form is limited only by your imagination, as is the capability and responsiveness.

Displaying a UserForm

Historically, batch applications accepted a few input arguments and then proceeded in a linear fashion to some predetermined and constrained result. The windowing metaphor vastly improved the flexibility of computer programmers by turning mostly linear batch processing into a dynamic array of opportunistic progressions to a litany of possible outcomes. That is, the flexibility of applications has increased in a windowing environment.

Taking advantage of the window metaphor is a matter of adding UserForms to your workbook. You can add as many or ...

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