Microsoft Office Tutorials and References
In Depth Information
A UserForm Checklist
Emulating Excel’s dialog boxes
The look and feel of Windows dialog boxes differs from program to program. When developing
applications for Excel, it’s best to try to mimic Excel’s dialog box style whenever possible.
In fact, a good way to learn how to create effective dialog boxes is to try to copy one of Excel’s
dialog boxes down to the smallest detail. For example, make sure that you get all the hot keys
defined and be sure that the tab order is the same. To re-create one of Excel’s dialog boxes, you
need to test it under various circumstances and see how it behaves. I guarantee that your
analysis of Excel’s dialog boxes will improve your own dialog boxes.
You’ll find that it’s impossible to duplicate some of Excel’s dialog boxes.
A UserForm Checklist
Before you unleash a UserForm on end users, be sure that everything is working correctly. The
following checklist should help you identify potential problems:
h Are similar controls the same size?
h Are the controls evenly spaced?
h Is the dialog box too overwhelming? If so, you may want to group the controls by using a
MultiPage control.
h Can every control be accessed with a hot key?
h Are any of the hot keys duplicated?
h Is the tab order set correctly?
h Will your VBA code take appropriate action if the user presses Esc or clicks the Close
button on the UserForm?
h Are there any misspellings in the text?
h Does the dialog box have an appropriate caption?
h Will the dialog box display properly at all video resolutions?
h Are the controls grouped logically (by function)?
h Do ScrollBar and SpinButton controls allow valid values only?
h Does the UserForm use any controls that might not be installed on every system?
h Are ListBoxes set properly (Single, Multi, or Extended)? See Chapter 14 for details on
ListBox controls.
Search JabSto ::

Custom Search