Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks both I will give those a try.
bw Binngo "Binngo" wrote: Hello I am trying to create a msg box so that when the user clicks 'yes' it triggers a macro to run. However at the moment when I click Yes the script ends and no macro is run - the same happens for No and Cancel but that is correct for those selections. The code I'm trying is shown below and sits at the start of the marco in question. I'm new to this so have not sure what to do. Any ideas? Sub clean() Msg = "Have you saved the current file data?" Response = MsgBox(Msg, vbYesNoCancel) If Response = vbYes Then '<=== runactivemacro clean() Exit Sub End If If Response = vbNo Then MsgBox "Use the Save As function to Save the file before cleaning the sheet" Exit Sub End If If Response = vbCancel Then MsgBox "Action Cancelled" Exit Sub End If ' clean Macro ' Macro recorded etc etc then all the macro detail is here |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add vbyesno to existing macro | Excel Programming | |||
How do I transform a word response to a numeric response? | Excel Discussion (Misc queries) | |||
How do I set up a daily call out response response register? | Excel Worksheet Functions | |||
Selecting a response on a dialogue box from a Macro | Excel Discussion (Misc queries) | |||
Macro for Customer response time | Excel Programming |