Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro protection
I have a program set up in excel it has a main screen with
a bunch of buttons that will take you to different area of the workbook, what I need is to put a password or something on the one button so that only those people who need access to that part of the book can get into it. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro protection
Michelle, here is one way to require a password to run a macro
Sub Password_Request() 'you must lock the VBA project so you can't see the password in it Dim PW As String PW = Application.InputBox( _ Prompt:="Please Enter The Password", _ Title:="Password Required To Run This Macro", _ Type:=2) If PW = "a123" Then 'Change password here, it is CASE sensitive '*****Put Your Code Here***** MsgBox "That's it !" Else '****If password does not match********* MsgBox Prompt:="Sorry, That Is Not The Correct Password", _ Title:="Incorrect Password", _ Buttons:=vbOKOnly End If 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 ** "Michelle" wrote in message ... I have a program set up in excel it has a main screen with a bunch of buttons that will take you to different area of the workbook, what I need is to put a password or something on the one button so that only those people who need access to that part of the book can get into it. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Data Protection- AKA: Sheet/Macro Password Protection | Setting up and Configuration of Excel | |||
Protection Macro | Excel Worksheet Functions | |||
Protection Macro | Excel Discussion (Misc queries) | |||
Protection + Macro = NOTHING! | Excel Programming | |||
protection macro | Excel Programming |