Chapter BuiltIn Dialog Boxes

The Excel object model contains a Dialog object for each of Excel's built-in dialog boxes. These Dialog objects are kept in the Dialogs collection and are indexed by the XlBuiltInDialog constants shown in Table 13-1 and Table 13-2. The Dialogs collection is returned by the Dialogs property of the Application object. In Table 13-1, "<vX>" indicates that the constant is new for Excel version X.

Table 13-1. XlBuiltInDialog constants and values

_xlDialogChartSourceData (541)<v9>

xlDialogFormatMove (128)

xlDialogPrinterSetup (9)

_xlDialogPhonetic (538)<v9>

xlDialogFormatNumber (42)

xlDialogPrintPreview (222)

xlDialogActivate (103)

xlDialogFormatOverlay (226)

xlDialogPromote (202)

xlDialogActiveCellFont (476)

xlDialogFormatSize (129)

xlDialogProperties (474)

xlDialogAddChartAutoformat (390)

xlDialogFormatText (89)

xlDialogPropertyFields (754)<v10>

xlDialogAddinManager (321)

xlDialogFormulaFind (64)

xlDialogProtectDocument (28)

xlDialogAlignment (43)

xlDialogFormulaGoto (63)

xlDialogProtectSharing (620)

xlDialogApplyNames (133)

xlDialogFormulaReplace (130)

xlDialogPublishAsWebPage (653)<v9>

xlDialogApplyStyle (212)

xlDialogFunctionWizard (450)

xlDialogPushbuttonProperties (445)

xlDialogAppMove (170)

xlDialogGallery3dArea (193)

xlDialogReplaceFont (134)

xlDialogAppSize (171)

xlDialogGallery3dBar (272)

xlDialogRoutingSlip (336)

xlDialogArrangeAll (12)

xlDialogGallery3dColumn (194)

xlDialogRowHeight (127)

xlDialogAssignToObject (213)

xlDialogGallery3dLine (195)

xlDialogRun (17)

xlDialogAssignToTool (293)

xlDialogGallery3dPie (196)

xlDialogSaveAs (5)

xlDialogAttachText (80)

xlDialogGallery3dSurface (273)

xlDialogSaveCopyAs (456)

xlDialogAttachToolbars (323)

xlDialogGalleryArea (67)

xlDialogSaveNewObject (208)

xlDialogAutoCorrect (485)

xlDialogGalleryBar (68)

xlDialogSaveWorkbook (145)

xlDialogAxes (78)

xlDialogGalleryColumn (69)

xlDialogSaveWorkspace (285)

xlDialogBorder (45)

xlDialogGalleryCustom (388)

xlDialogScale (87)

xlDialogCalculation (32)

xlDialogGalleryDoughnut (344)

xlDialogScenarioAdd (307)

xlDialogCellProtection (46)

xlDialogGalleryLine (70)

xlDialogScenarioCells (305)

xlDialogChangeLink (166)

xlDialogGalleryPie (71)

xlDialogScenarioEdit (308)

xlDialogChartAddData (392)

xlDialogGalleryRadar (249)

xlDialogScenarioMerge (473)

xlDialogChartLocation (527)

xlDialogGalleryScatter (72)

xlDialogScenarioSummary (311)

xlDialogChartOptionsDataLabelMultiple (724)<v10>

xlDialogGoalSeek (198)

xlDialogScrollbarProperties (420)

xlDialogChartOptionsDataLabels (505)

xlDialogGridlines (76)

xlDialogSearch (731)<v10>

xlDialogChartOptionsDataTable (506)

xlDialoglmportTextFile

(666)<v9>

xlDialogSelectSpecial (132)

xlDialogChartSourceData (540)

xlDialoglnsert (55)

xlDialogSendMail (189)

xlDialogChartTrend (350)

xlDialoglnsertHyperlink (596)

xlDialogSeriesAxes (460)

xlDialogChartType (526)

xlDialoglnsertNameLabel (496)

xlDialogSeriesOptions (557)

xlDialogChartWizard (288)

xlDialoglnsertObject (259)

xlDialogSeriesOrder (466)

xlDialogCheckboxProperties (435)

xlDialoglnsertPicture (342)

xlDialogSeriesShape (504)

xlDialogClear (52)

xlDialoglnsertTitle (380)

xlDialogSeriesX (461)

xlDialogColorPalette (161)

xlDialogLabelProperties (436)

xlDialogSeriesY (462)

xlDialogColumnWidth (47)

xlDialogListboxProperties (437)

xlDialogSetBackgroundPicture (509)

xlDialogCombination (73)

xlDialogMacroOptions (382)

xlDialogSetPrintTitles (23)

xlDialogConditionalFormatting (583)

xlDialogMailEditMailer (470)

xlDialogSetUpdateStatus (159)

xlDialogConsolidate (191)

xlDialogMailLogon (339)

xlDialogShowDetail (204)

xlDialogCopyChart (147)

xlDialogMailNextLetter (378) J

xlDialogShowToolbar (220)

xlDialogCopyPicture (108)

xlDialogMainChart (85)

xlDialogSize (261)

xlDialogCreateNames (62)

xlDialogMainChartType (185)

xlDialogSort (39)

xlDialogCreatePublisher (217)

xlDialogMenuEditor (322)

xlDialogSortSpecial (192)

xlDialogCustomizeToolbar (276)

xlDialogMove (262)

xlDialogSplit (137)

xlDialogCustomViews (493)

xlDialogNew (119)

xlDialogStandardFont (190)

xlDialogDataDelete (36)

xlDialogNewWebQuery (667)<v9>

xlDialog StandardWidth (472)

xlDialogDataLabel (379)

xlDialogNote (154)

xlDialogStyle (44)

xlDialogDataLabelMultiple (723)<v10>

xlDialogObjectProperties (207)

xlDialogSubscribeTo (218)

xlDialogDataSeries (40)

xlDialogObjectProtection (214)

xlDialogSubtotalCreate (398)

xlDialogDataValidation (525)

xlDialogOpen (1)

xlDialogSummarylnfo (474)

xlDialogDefineName (61)

xlDialogOpenLinks (2)

xlDialogTable (41)

xlDialogDefmeStyle (229)

xlDialogOpenMail (188)

xlDialogTabOrder (394)

xlDialogDeleteFormat (111)

xlDialogOpenText (441)

xlDialogTextToColumns (422)

xlDialogDeleteName (110)

xlDialogOptionsCalculation (318)

xlDialogUnhide (94)

xlDialogDemote (203)

xlDialogOptionsChart (325)

xlDialogUpdateLink (201)

xlDialogDisplay (27)

xlDialogOptionsEdit (319)

xlDialogVbalnsertFile (328)

xlDialogEditboxProperties (438)

xlDialogOptionsGeneral (356)

xlDialogVbaMakeAddin (478)

xlDialogEditColor (223)

xlDialogOptionsListsAdd (458)

xlDialogVbaProcedureDefinition (330)

xlDialogEditDelete (54)

xlDialogOptionsME (647)<v9>

xlDialogView3d (197)

xlDialogEditionOptions (251)

xlDialogOptionsTransition (355)

xlDialogWebOptionsBrowsers (773)<v10>

xlDialogEditSeries (228)

xlDialogOptionsView (320)

xlDialogWebOptionsEncoding (686)<v9>

xlDialogErrorbarX (463)

xlDialogOutline (142)

xlDialogWebOptionsFiles (684)<v9>

xlDialogErrorbarY (464)

xlDialogOverlay (86)

xlDialogWebOptionsFonts (687)<v9>

xlDialogErrorChecking (732)<v10>

xlDialogOverlayChartType (186)

xlDialogWebOptionsGeneral (683)<v9>

xlDialogEvaluateFormula (709)<v10>

xlDialogPageSetup (7)

xlDialogWebOptionsPictures (685)<v9>

xlDialogExternalDataProperties (530)<v9>

xlDialogParse (91)

xlDialogWindowMove (14)

xlDialogExtract (35)

xlDialogPasteNames (58)

xlDialogWindowSize (13)

xlDialogFileDelete (6)

xlDialogPasteSpecial (53)

xlDialogWorkbookAdd (281)

xlDialogFileSharing (481)

xlDialogPatterns (84)

xlDialogWorkbookCopy (283)

xlDialogFillGroup (200)

xlDialogPhonetic (656)

xlDialogWorkbooklnsert (354)

xlDialogFillWorkgroup (301)

xlDialogPivotCalculatedF ield (570)

xlDialogWorkbookMove (282)

xlDialogFilter (447)

xlDialogPivotCalculatedltem (572)

xlDialogWorkbookName (386)

xlDialogFilterAdvanced (370)

xlDialogPivotClientServerSet (689)<v9>

xlDialogWorkbookNew (302)

xlDialogFindFile (475)

xlDialogPivotFieldGroup (433)

xlDialogWorkbookOptions (284)

xlDialogFont (26)

xlDialogPivotF ieldProperties (313)

xlDialogWorkbookProtect (417)

xlDialogFontProperties (381)

xlDialogPivotFieldUngroup (434)

xlDialogWorkbookTabSplit (415)

xlDialogFormatAuto (269)

xlDialogPivotShowPages (421)

xlDialogWorkbookUnhide (384)

xlDialogFormatChart (465)

xlDialogPivotSolveOrder (568)

xlDialogWorkgroup (199)

xlDialogFormatCharttype (423)

xlDialogPivotTableOptions (567)

xlDialogWorkspace (95)

xlDialogFormatFont (150)

xlDialogPivotTableWizard (312)

xlDialogZoom (256)

xlDialogFormatLegend (88)

xlDialogPlacement (300)

xlDialogFormatMain (225)

xlDialogPrint (8)

Table 13-2. Additional XlBuiltlnDialog 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:

Application.Dialogs(xlDialogOpen) The Open dialog box is shown in Figure 13-1.

Figure 13-1. The Open File dialog box

Figure 13-1. The Open File dialog box

Unfortunately, the Dialog object has only one useful property or method: the Show method.

0 -1

Post a comment