Show Method

Applies To

CustomView object, Dialog object, Range object, Scenario object.

Description

CustomView object (Syntax 1): Displays the custom view.

Range object (Syntax 1): Scrolls through the contents of the active window to move the range into view. The range must consist of a single cell in the active document.

Scenario object (Syntax 1): Shows the scenario by inserting its values on the worksheet. The affected cells are the changing cells of the scenario.

Dialog object (Syntax 2): Displays the built-in dialog box and waits for the user to input data.

Syntax 1

expression.Show

Syntax 2

object.Show(arg1, arg2, ..., arg30)

expression Required. For Syntax 1, an expression that returns an object in the Applies To list.

arg1, arg2, ..., arg30 Optional Variant. For built-in dialog boxes only, the initial arguments for the command. For more information, see the "Remarks" section.

Remarks

For built in dialog boxes, this method returns True if the user clicks OK, or it returns False if the user clicks Cancel.

You can use a single dialog box to change many properties at the same time. For example, you can use the Format Cells dialog box to change all the properties of the Font object.

For some built-in dialog boxes (the Open dialog box, for example), you can set initial values using arg1, arg2, ..., arg30. To find the arguments to set, locate the corresponding dialog box constant in Built-In Dialog Box Argument Lists. For example, search for the xlDialogOpen constant to find the arguments for the Open dialog box. For more information about built-in dialog boxes, see the Dialogs collection.

Example

This example displays the Open dialog box.

Application.Dialogs(xlDialogOpen).Show