Protected Macro Activation

  • Thread starter Thread starter Db1712
  • Start date Start date
D

Db1712

Is there a way to setup a macro that will prior to activating request
valid password or a warning drop down box. A little more info...I se
up a button to activate a macro to clear out data within a wor
book..I just don't want any permature erasers. Thanks in advance fo
any assistance with this
 
Just a simple yes/no question ok?

Option Explicit
Sub testme01()

Dim resp As Long

resp = MsgBox(prompt:="Are you sure you want to do this?", _
Buttons:=vbYesNo)

If resp = vbNo Then
Exit Sub
End If

'your code here

End Sub
 

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