ActiveDialogName Property
The ActiveDialogName property returns the name of the active dialog box.
To open a message box displaying the dialog box name when you open a new dialog box, use the following code:
Sub DialogBox(DialogBoxName, IsOpen) On Error Resume Next msgbox "You have just opened the " & ActiveDialogName & _ " dialog box." On Error GoTo 0 End Sub