Is it possible to password protect a button?

Randal G

Board Regular
Joined
Feb 26, 2003
Messages
73
I have a button of which activates a macro to reset a work calculations calendar. It is important that I don't accidentally click the button till its time. I could just set it up manually enter the variable that would handle the resetc(which is what I had), but the button would be nice if I could just password or otherwise protect it.
If this is a VB solution... go easy on me. It's my short coming.
Thanks to any solutions
Randal G.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Re: WELCOME TO THE BOARD!

Glad to help & thanks for the feedback
 
Upvote 0
Re: WELCOME TO THE BOARD!

Hello, now box haven't any reaction when i click cancel. Could you help? I want to exit password box if i filled data wrong by cancel.
 
Upvote 0
Re: WELCOME TO THE BOARD!

Try
Code:
Sub Pword()

    Dim Ans As Variant
    Const Pword As String = "Zebra"
    
    Do While Ans <> Pword
        Ans = Application.InputBox("Please enter password to continue.", "Enter Password")
        If Ans = Pword Then Exit Do
        If Ans = False Then Exit Do
     Loop

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,836
Messages
6,127,177
Members
449,368
Latest member
JayHo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top