How do I assign a password to a button in excel?
Thanks,
Mark
How do I assign a password to a button in excel?
Thanks,
Mark
It isn't clear what you mean. You can't set up a command button
such that you need a password to click it.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Mark" <[email protected]> wrote in message
news:[email protected]...
> How do I assign a password to a button in excel?
>
> Thanks,
>
> Mark
Hi Mark,
Try something like:
'=============>>
Private Sub CommandButton1_Click()
Dim res As Variant
Const PWORD As String = "ABCD" '<<==== CHANGE
res = InputBox("Insert password")
If res <> PWORD Then Exit Sub
'Your button code
End Sub
'<<=============
---
Regards,
Norman
"Mark" <[email protected]> wrote in message
news:[email protected]...
> How do I assign a password to a button in excel?
>
> Thanks,
>
> Mark
Chip Pearson wrote:
>> It isn't clear what you mean. You can't set up a command
>> button such that you need a password to click it.
>>
I have a button driven spreadsheet used on a network. I want to password
protect the button which is used for uncustomising things when I make
changes.
Basically the button runs a variation of the auto close macro without
actually closing down. When the button is pressed I want excel to ask for a
password.
Thanks,
Mark
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks