Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to pop up a "confirm dialog" window in run macro process?

I want to pop up a "confirm dialog" window which contain "Yes" and "No" buttons when user running the macro.

sub Reload

     ActiveDocument.Reload

end sub

2 Replies
mbm
Employee
Employee

John,

Here is the macro code to prompt prior to your reload.

Sub Reload

    reloadPrompt=MsgBox("Do You Want to Reload",4,"Confirm Reload")  

    if reloadPrompt = vbYes then

          ActiveDocument.Reload

    end if

End Sub

Attached is a simple example QVW which shows the functionality

jerrysvensson
Partner - Specialist II
Partner - Specialist II

One thing to remember is that pop up dialogs will not work in Ajax.