Microsoft Office Tutorials and References
In Depth Information
Table 13-2. Additional XlBuiltInDialog Constants and Their Values for Excel 9.0
312) (
xlDialogFormatFont (150)
xlDialogZoom (256)
xlDialogFormatLegend (88)
xlDialogPlacement (300)
xlDialogFormatMain (225)
xlDialogPrint (8)
Table 13-2. Additional XlBuiltInDialog Constants and Their Values for Excel 9.0
_xlDialogChartSourceData (541)
xlDialogOptionsME (647)
xlDialogWebOptionsFonts (687)
_xlDialogPhonetic (538)
xlDialogPivotClientServerSet (689)
xlDialogWebOptionsGeneral (683)
xlDialogExternalDataProperties (530) xlDialogPublishAsWebPage (653)
xlDialogWebOptionsPictures (685)
xlDialogImportTextFile (666)
xlDialogWebOptionsEncoding (686)
xlDialogNewWebQuery (667)
xlDialogWebOptionsFiles (684)
Note that each of the constants in Table 13-1 is formed from the prefix xlDialog followed by
the name of the dialog box. For example, the Open dialog box constant is xlDialogOpen and so
the corresponding Dialog object is:
The Open dialog box is shown in Figure 13-1 .
Figure 13-1. The Open File dialog box
Unfortunately, the Dialog object has only one useful property or method: the Show method.
13.1 The Show Method
The Show method displays a dialog box. This provides a convenient way to "lead" the user to a
built-in dialog box. Unfortunately, we cannot access the values that the user enters into that dialog.
Until the dialog is dismissed by the user and the actions specified in the dialog are completed, we
have no control over the chain of events. (In Word 97, for instance, we can use built-in dialog
boxes to get values from the user, without letting Word act automatically on those values.)
To illustrate, the code:
displays the Open dialog box in Figure 13-1 . The Show method returns True if the user clicks the
OK button and False if the user clicks the Cancel button.
Search JabSto ::

Custom Search