PC Review


Reply
Thread Tools Rate Thread

Assign Password to Button

 
 
Mark
Guest
Posts: n/a
 
      21st May 2006
How do I assign a password to a button in excel?

Thanks,

Mark
 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      21st May 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How do I assign a password to a button in excel?
>
> Thanks,
>
> Mark



 
Reply With Quote
 
Norman Jones
Guest
Posts: n/a
 
      21st May 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How do I assign a password to a button in excel?
>
> Thanks,
>
> Mark



 
Reply With Quote
 
Mark
Guest
Posts: n/a
 
      22nd May 2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign toolbar button to keyboard or device button =?Utf-8?B?Um9i?= Microsoft Dot NET Compact Framework 1 1st Apr 2006 02:16 AM
Assign F4 to a button A.M-SG Microsoft Dot NET Framework Forms 2 2nd Feb 2006 02:58 PM
how can I assign a password to a command button =?Utf-8?B?SGVscCE=?= Microsoft Excel Programming 2 4th Jan 2006 01:52 PM
How can I assign a symbol to a button (like the $ button) =?Utf-8?B?Tmlja1c=?= Microsoft Excel Misc 2 6th Sep 2005 02:45 PM
How do I Assign Macro to a button? =?Utf-8?B?QmVsbEV4Y2Vs?= Microsoft Excel Charting 4 20th May 2005 07:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:51 PM.