Add message box to confirm run macro
One way:
Dim nResult As Long
nResult = MsgBox( _
Prompt:="Really run this macro?", _
Buttons:=vbYesNo)
If nResult = vbYes Then
'Rest of macro macro
MsgBox "OK"
End If
In article ,
Anolan wrote:
Anyone...I would like to add a message box to my code that will prompt the
user with a "Yes" or "No" to confirm running a macro when the user clicks the
command button. If YES, then the macro resumes; however, if NO, then the
macros stops.
Thanks in advance...Andy
|