Code Checkpoints

anderhood
03-31-2003, 10:16 AM
I have a very long excel macro that I am building and I wanted to add something to it that pauses the macro at logical breaks and asks the user if they would like to continue. If they chose "ok" it will go on as written and if they choose "cancel" it will stop the macro. I haven't had any luck doing this...please help. Thanks!

Wamphyri
03-31-2003, 10:24 AM
You need to check the value returned from the message box

Dim Answer As Integer
Answer = MsgBox("Continue?", vbYesNo)
'clicked yes or no
If Answer = vbNo Then
Exit Sub
End If

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum