Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Of course you had better password protect your code as well.
Jon "John" wrote in message ... Thanks R.Bell, thats neat "r.bell321" wrote in message ... The original subroutine would have to read: Sub PasswordForAMacro() Userform1.Show End Sub You would need a userform (called Userform1) with a text box (called Textbox1 with PasswordChar property set to "*") and a button (called Button1) to submit the userform. Then put the following code in the userform Sub Button1_Click() If Textbox1.text < "1234" Then MsgBox "Invalid password - you cannot access this" Userform1.Hide Exit Sub Else 'type the actions / code you require to run' Userform1.Hide End If -- r.bell321Posted from - http://www.officehelp.in |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to allow auto filter after running password protect | Excel Discussion (Misc queries) | |||
Password for Running the Macro | Excel Discussion (Misc queries) | |||
Password Protect Macro? | Excel Programming | |||
Add protect worksheet password in macro | Excel Worksheet Functions | |||
Password protect macro | Excel Programming |