Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro if msgbox is yes
Todd,
Try something like If MsgBox("Email Agents now?. Do you want to continue?", vbYesNo) = vbNo Then Exit Sub End If EmailNow -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Todd Huttenstine" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro if msgbox is yes
well that was easy. Thank you.
-----Original Message----- Todd, Try something like If MsgBox("Email Agents now?. Do you want to continue?", vbYesNo) = vbNo Then Exit Sub End If EmailNow -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Todd Huttenstine" wrote in message ... 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto filter using msgbox in macro not woking | Excel Discussion (Misc queries) | |||
Macro display Msgbox when cells are empty | Excel Discussion (Misc queries) | |||
How do I format a MSGBOX to show text and variables in a macro? | New Users to Excel | |||
Macro - MsgBox | Excel Worksheet Functions | |||
Macro - msgbox | Excel Worksheet Functions |