Create the User Form

Create the dialog shown in Figure 21-32 in the Print.xls workbook. Name the dialog dlgPrintCharts, change its caption to "Print Charts," and change the PrintCharts procedure to:

Public Sub PrintCharts()

dlgPrintCharts.Show End Sub

The dlgPrintCharts dialog has two command buttons and one list box. List box

Place a list box on the form as in Figure 21-32. Using the Properties window, set the properties shown in Table 21-9.

Table 21-9. Nondefault Properties of the ListBox Control









The MultiSelect property is set to frmMultiSelectExtended so that the user can use the Control key to select multiple (possibly nonconsecutive) entries and the Shift key to select multiple consecutive entries.

The TabIndex property determines not only the order in which the controls are visited as the user hits the Tab key, but also determines which control has the initial focus. Since we want the initial focus to be on the list box, we set its tab index to 0.

0 0

Post a comment