Thread: msgbox cancel?
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
sycsummit sycsummit is offline
external usenet poster
 
Posts: 21
Default msgbox cancel?

I have a snippet of code attached to a clickable button that emails a
workbook to a specified address. However, I would like a confirmation box to
pop up asking for confirmation before this action is taken. I've gotten as
far as:

Dim response As Long
response = MsgBox(prompt:="Are you sure you would like to submit?",
Buttons:=vbOKCancel)

Now, when OK is clicked, the form executes as it should. But, if I click
cancel, the button still executes. How do I program it to do nothing and
return to the form I was just using, taking no action, if cancel is clicked?
Thanks...