Skip to content

Latest commit

 

History

History
49 lines (28 loc) · 1.16 KB

Excel.Range.DialogBox.md

File metadata and controls

49 lines (28 loc) · 1.16 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Range.DialogBox method (Excel)
vbaxl10.chm144117
vbaxl10.chm144117
Excel.Range.DialogBox
d2d4a677-bd6a-910d-ff53-f95585f40925
05/10/2019
medium

Range.DialogBox method (Excel)

Displays a dialog box defined by a dialog box definition table on a Microsoft Excel 4.0 macro sheet. Returns the number of the chosen control, or returns False if the user chooses the Cancel button.

Syntax

expression.DialogBox

expression A variable that represents a Range object.

Return value

Variant

Remarks

The Range must refer to a dialog box definition table on a Microsoft Excel 4.0 macro sheet.

Example

This example runs a Microsoft Excel 4.0 dialog box and then displays the return value in a message box. The dialogRange variable refers to the dialog box definition table on the Microsoft Excel 4.0 macro sheet named Macro1.

Set dialogRange = Excel4MacroSheets("Macro1").Range("myDialogBox") 
result = dialogRange.DialogBox 
MsgBox result

[!includeSupport and feedback]