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

Get Excel 2003 VBA Programmer's Reference 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.