Add a warning popup to a Macro Button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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)
 
Hi

Thanks for this - however I'm a complete novice - what am I supposed to do
with it?

Kind regards

Teresa
 
Hi

Thanks for this - however I'm a complete novice - what am I supposed to do
with it?

Kind regards

Teresa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top