Pause Macro 2
Thanks again Ken.
This was an addition to yesterdays question.
Its so good to get this help.
Thaks a lot
Regards
Ollie
"Ken Johnson" wrote:
Ollie wrote:
have another pause macro problem.
I have created a macro
Dim myStr As String
myStr = InputBox(Prompt:="Please enter your name")
Range("a3").Select
ActiveCell.FormulaR1C1 = myStr
MsgBox " You entered:" &myStr
"other code that does more
The input box has 2 options OK and Cancel.
If I click on cancel it still continues with the "other code that does more"
instead of quiting the macro.
Would appreciate any help.
Thanks
Hi Ollie,
If you need to exit the macro when the user clicks cancel you will need
something like
If myStr = "" Then
Exit Sub
End If
Ken Johnson
|