Question : Warning for Macro execution

What is the short macro code that is required to stop a macro and ask "Are you sure you want to "  " " ?   before continuing on or stopping?

Answer : Warning for Macro execution

This will prompt you and continue or stop based on the button selected.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
Sub MacroStart()

    Dim myAns As String
    
    myAns = MsgBox("Are you sure you want to continue running macro?", vbYesNo + vbInformation, "Continue?")
    
    If myAns = vbYes Then
        'Continue Running Macro
    Else
        'Stop Running Macro
    End If

End Sub
Random Solutions  
 
programming4us programming4us