Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I put a password on a macro button?
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just, some thing like this
Sub PassWord_To_Run() 'must lock VBA project so you can't see the password in it Dim MyStr1 As String, MyStr2 As String With ActiveSheet MyStr2 = ("123") 'This is the password and it is CASE sensitive MyStr1 = InputBox("Password Is Required To Run this Macro ") If MyStr1 = MyStr2 Then 'your code here Else MsgBox ("Access Denied") End If End With End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 2003 ** remove news from my email address to reply by email ** "justaguyfromky" wrote in message ... How can I put a password on a macro button? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the macro itself, write the code to prompt for the password and to
validate and react to the response. -- Regards, Tom Ogilvy "justaguyfromky" wrote in message ... How can I put a password on a macro button? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run Macros in a Password-protected workbook? | Excel Discussion (Misc queries) | |||
Password protect macros in Excel | Excel Discussion (Misc queries) | |||
Password protect a sheet without Macros | Excel Discussion (Misc queries) | |||
password protecting macros | Excel Programming | |||
Password set/clear macros - help! | Excel Programming |