Message box with Yes or No option
What's the code to stop running the macro? Sorry - I'm self taught at all
this, so I'm not up to par on codes as much as others here. I kind of am
learning as I go.
"Barb Reinhardt" wrote:
Try adding this
Dim PolicyMod as VBMsgBoxResult
PolicyMod = Msgbox("Is the Policy Mod # correct?", vbYesNo)
if PolicyMod = vbYes then
'Do execution for Yes
elseif PolicyMod = vbNo then
'Do stuff for No
end if
"Munchkin" wrote:
I want to my 2nd message box (is the policy mod # is correct) to have a Yes
or No button - if yes is clicked, the macro proceeeds, if no is clicked
another message box should appear stateing "Find correct policy mod" and the
macro should stop running.
How do I do this? Thanks!
MY MACRO:
If Len(Application.Trim(Range("E5"))) < 1 Then
MsgBox "You have not entered a policy name"
Exit Sub
End If
'MsgBox "go on "
MsgBox "Is the Policy Mod # correct?"
|