Example Printing Sheets

We can now implement the PrintSheets feature of our SRXUtils application. Recall that at the present time, this Print utility, located in the Print.utl add-in, simply displays a message box. To implement this feature, we want the utility to first display a dialog box, as shown in Figure 18-7. The list box contains a list of all sheets in the active workbook. The user can select one or more sheets and hit the Print button to print these sheets.

Figure 18-7. Print sheets dialog

The steps to create the print utility are as follows: all the action takes place in the Print.xls workbook, so open this workbook. When the changes are finished, you will need to save Print.xls as Print.utl as well. If Print.utl is loaded, the only way to unload it is to unload the add-in SRXUtils.xla (if it is loaded) and close the workbook SRXUtils.xls (if it is open).

0 0

Post a comment