WizardsWizard dialogs are normally used when we need to collect a reasonably large amount of data from the user. The only absolute requirement this data must fulfill in order to be a candidate for a wizard dialog is that the bits of data being collected must be logically related to each other in some way. Wizard dialogs are particularly useful where the data being collected has the following characteristics in addition to being logically related:The information is complex and varied.The information must be supplied in a defined order because earlier selections alter the allowable parameters of later selections.The user does not need to understand the relationship between earlier and later choices. The wizard dialog can then abstract this decision-making process away from the user. The primary purpose of a wizard dialog is to reduce the number of choices the user must make at any one time to a manageable level. An important secondary purpose of a wizard dialog is to allow us to alter the parts of the user interface that depend on the selections the user is currently making without having to do so in a way that is visible to the user and thereby potentially distract them from the task at hand (see Dynamic Userforms later for an example). Design Rules for Wizard DialogsThe first page of a wizard dialog should explain the purpose of the wizard and the steps involved, but always have a "Don't show me this again" check box to automatically skip the first page if the user wants.The last page of a wizard dialog should confirm everything the user has entered and all the choices made, and no actions are performed until the user clicks the Finish button.Always display the step number within the wizard that the user is currently working on as well as the total number of steps left to complete. This information is typically displayed in the title bar, although we've seen perfectly acceptable designs that display it elsewhere.Navigation through the wizard is typically controlled by a series of four buttons: Cancel, Back, Next and Finish. The enabled state of these buttons should be used to provide visual clues to the user about how they're doing. Track the user's progress through the wizard and watch their input during each step of the wizard. Based on where the user is and what data he has entered, enable only the navigation buttons that makes sense, such as the following:Validation earlier).Last step with all data entered and validatedCancel enabled, Back enabled, Next disabled and Finish enabled.The user has completed all wizard steps correctly but then used the Back button to revisit an earlier stepAll buttons enabled until the user makes an entry that invalidates the ability of the wizard to finish or move forward.In, say, a five-step wizard, if steps four and five allow the user to enter optional information, the Finish button can be enabled after step three. Excel's Chart Wizard is a good example of this.The user can move back and forth through wizards to his heart's content. Therefore, you must always keep track of the status of all steps in the wizard in order to properly set the status of the navigation buttons. It is perfectly appropriate for the user to click Finish from step two of a five-step wizard as long as he has completed all five steps and has just moved back to step two in order to make a minor change.In some wizard designs, selections made on a step affect other selections on that same step. If a selection on a step makes another selection on that same step unnecessary, do not hide the controls for the unnecessary selection. Just disable them. Controls that pop in and out of existence in front of the user's face tend to be a confusing distraction. Creating a Wizard DialogThe easiest way to create a wizard dialog is to use a MultiPage control, with each page of the control being used for a separate step of the wizard and a common set of buttons at the bottom. Figure 10-8 shows the wizard userform template included on the CD in the WizardDemo.xls workbook, with the MultiPage tabs showing on the right side. Prior to distributing the wizard, the MultiPage should be formatted to not have any tabs showing by setting its Style property to fmTabStyleNone, and reducing both the MultiPage's and userform's width accordingly. Figure 10-8. An Empty Wizard Userform Using a MultiPage Control for the Steps![]() Listing 10-18. The Navigation Code for a Wizard Dialog
![]() |