Structure

The histogram wizard has five main dialogs. They are called from a main subroutine which is essentially a series of nested Select Case statements. One block has the following structure.

This is the basic structure. Each step in the wizard has a few quirks, such as validation routines and setting status flags. Each dialog has one or more routines that handle the setup and display of the dialog, respond to user events, and manage a worksheet and chart the wizard creates for each histogram. The final dialog has a chart preview feature. Although Excel does not include a chart preview as part of VBA, A serviceable preview is possible by pasting a chart object onto the dialog sheet. While the dialog is displayed, the chart object updates in real time in response to changes made to controls on the dialog. It's a rather nifty feature.