Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Add a warning popup to a Macro Button
I have created a button and assigned a recorded macro to it that clears the
contents of the entire worksheet - however I've had a second thought & now want a warning to popup when the button is clicked that the person has to click through before the macro will run - kind of like the old "Are you sure?" message. How can I do this with very limited knowledge? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Add a warning popup to a Macro Button
Dim ans as long
ans = MsgBox("Are you sure?, vbYesNo) if ans = vbYes Then ... your code End If -- HTH RP (remove nothere from the email address if mailing direct) "Teresa" wrote in message ... I have created a button and assigned a recorded macro to it that clears the contents of the entire worksheet - however I've had a second thought & now want a warning to popup when the button is clicked that the person has to click through before the macro will run - kind of like the old "Are you sure?" message. How can I do this with very limited knowledge? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Add a warning popup to a Macro Button
else exit sub
End If ?? -- paul remove nospam for email addy! "Bob Phillips" wrote: Dim ans as long ans = MsgBox("Are you sure?, vbYesNo) if ans = vbYes Then ... your code End If -- HTH RP (remove nothere from the email address if mailing direct) "Teresa" wrote in message ... I have created a button and assigned a recorded macro to it that clears the contents of the entire worksheet - however I've had a second thought & now want a warning to popup when the button is clicked that the person has to click through before the macro will run - kind of like the old "Are you sure?" message. How can I do this with very limited knowledge? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Add a warning popup to a Macro Button
Hi
Thanks for this - however I'm a complete novice - what am I supposed to do with it? Kind regards Teresa "Bob Phillips" wrote: Dim ans as long ans = MsgBox("Are you sure?, vbYesNo) if ans = vbYes Then ... your code End If -- HTH RP (remove nothere from the email address if mailing direct) "Teresa" wrote in message ... I have created a button and assigned a recorded macro to it that clears the contents of the entire worksheet - however I've had a second thought & now want a warning to popup when the button is clicked that the person has to click through before the macro will run - kind of like the old "Are you sure?" message. How can I do this with very limited knowledge? |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Add a warning popup to a Macro Button
Hi
Thanks for this - however I'm a complete novice - what am I supposed to do with it? Kind regards Teresa "paul" wrote: else exit sub End If ?? -- paul remove nospam for email addy! "Bob Phillips" wrote: Dim ans as long ans = MsgBox("Are you sure?, vbYesNo) if ans = vbYes Then ... your code End If -- HTH RP (remove nothere from the email address if mailing direct) "Teresa" wrote in message ... I have created a button and assigned a recorded macro to it that clears the contents of the entire worksheet - however I've had a second thought & now want a warning to popup when the button is clicked that the person has to click through before the macro will run - kind of like the old "Are you sure?" message. How can I do this with very limited knowledge? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create a command button, then assign macro to it in excel | Excel Discussion (Misc queries) | |||
Assign a macro to Command Button Object | Excel Discussion (Misc queries) | |||
Macro Button | Excel Discussion (Misc queries) | |||
Attaching a macro to a VB button on a form | Excel Worksheet Functions | |||
Assigning a macro to a "button" | Excel Discussion (Misc queries) |