Item Property (Dialogs Collection)

         Example         Applies To

Returns a Dialog object that represents a single built-in dialog box. Read-only.

Syntax

expression.Item(Index)

expression   Required. An expression that returns a Dialogs collection.

Index   Required Long. The built-in dialog box to return. Can be any one of the XlBuiltInDialog constants.

Remarks

Using the Item property of the Dialogs collection and the Show method, you can display approximately 200 built-in dialog boxes. Each dialog box has a constant assigned to it; these constants all begin with "xlDialog."

For a table of the available constants and their corresponding argument lists, see Built-In Dialog Box Argument Lists.

The Item property of the Dialogs collection may fail if you try to show a dialog box in an incorrect context. For example, to display the Data Labels dialog box (using the Visual Basic expression Application.Dialogs(xlDialogDataLabel).Show), the active sheet must be a chart; otherwise, the property fails.