Item Property (Dialogs Collection)

Applies To

Dialogs collection object.

Description

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."

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.

Example

This example displays the Open dialog box and selects the Read-Only option.

Application.Dialogs.Item(xlDialogOpen).Show arg3:=True