How Run or Stop a Macro with VBA Input Box and Message Box Responses
Sub Run_Stop_Macro()
Alert = MsgBox("The Macro will Update the Report with Latest Data ", vbYesNo, "Do You Wants to Update the Data Now ?")
If Alert = vbNo Then Exit Sub
ReTry:
PW = InputBox("Enter the Password To Run a Macro", "Please Enter the Password", vbOKCancel)
If PW = vbNullString Then Exit Sub
If Application.Proper(PW) <> "Tamatam" Then
MsgBox "Please Enter the Correct Password", vbCritical, "Wrong Password! Try Again!"
GoTo ReTry:
End If
'Macro Code Stuff for Your Requirement here.....You Go......
End Sub
Thanks,
TAMATAM
Sub Run_Stop_Macro()
Alert = MsgBox("The Macro will Update the Report with Latest Data ", vbYesNo, "Do You Wants to Update the Data Now ?")
If Alert = vbNo Then Exit Sub
ReTry:
PW = InputBox("Enter the Password To Run a Macro", "Please Enter the Password", vbOKCancel)
If PW = vbNullString Then Exit Sub
If Application.Proper(PW) <> "Tamatam" Then
MsgBox "Please Enter the Correct Password", vbCritical, "Wrong Password! Try Again!"
GoTo ReTry:
End If
'Macro Code Stuff for Your Requirement here.....You Go......
End Sub
Thanks,
TAMATAM