Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How can I protect a macro so that you need to give a password before you can
run the macro? Once the file is closed the macro protection should automatically be protected. Thank you in advance! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way is to ask for the password right in the macro.
Sub PassExample() Dim PW As String PW = InputBox("Password please", "Password to Run Macro") If PW = "pass" Then MsgBox "Running macro" Else MsgBox "Sorry" End If End Sub -- Jim "Johan_vl2431" wrote in message ... | How can I protect a macro so that you need to give a password before you can | run the macro? | Once the file is closed the macro protection should automatically be | protected. | | Thank you in advance! | |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect sheet in macro | Excel Worksheet Functions | |||
Protect macro | Excel Discussion (Misc queries) | |||
Using macro to un/protect sheet | Excel Worksheet Functions | |||
Add protect worksheet password in macro | Excel Worksheet Functions | |||
How to protect my macro | Excel Discussion (Misc queries) |