View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Todd Huttenstine[_2_] Todd Huttenstine[_2_] is offline
external usenet poster
 
Posts: 237
Default Running a macro if msgbox is yes

Below is a message box popup I have in a code. I have a
macro called "emailnow". What I would like is if the user
clicks yes when the messagebox pops up, the code run
macro "emailnow". If the user clicks no, the sub will end.


If MsgBox("Email Agents now?. Do you want to continue?",
vbYesNo) = vbNo Then
Exit Sub
End If



Can anyone tell me how to do this?

Thanx

Todd Huttenstine