Full Excel VBA Macros
|
|
Prompt to Confirm Macro Run | |
Sub Confirm_Macro_Run() | |
Msg = "Do you really want to run this macro?" | |
Ans = Msgbox(Msg, vbQuestion + vbYesNo, "Are you sure???") | |
Select Case Ans | |
Case vbYes 'user selects Yes | |
'put macro code to be run here | |
Case vbNo 'user selects No | |
Exit Sub 'exit the macro and do nothing | |
End Select | |
End Sub | |