Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I make makros that can do a lot of things. I use the function for
protecting cells; where the code shall not be disturbed. The makro have to unprotect the sheet; do the job; and then lock it again. I want to use a password when i lock a sheet. That is simple. But then the macro can't open it again. Will somebody please tell me how to make a makro who unlocks a sheet with a password. Sub MyMakro() ActiveSheet.Unprotect ' '(I want a possibility to let the makro unprotect a sheet; who is protected with a password) ' Here comes the VBA for what the makro shall do. ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.EnableSelection = xlUnlockedCells '(At least I want a possibility to let the makro protect the sheet with a password) End Sub Thank you !! Per R Norway -- Med hilsen Per Roar Øgaard |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
forgotton password to open excel sheet | Excel Discussion (Misc queries) | |||
Password required in VBA to open the sheet | Excel Worksheet Functions | |||
Open a workbook with a password via macro - How to? | Excel Discussion (Misc queries) | |||
Input password or open the sheet as "Read only | Excel Discussion (Misc queries) | |||
Macro Password to open or access | Excel Worksheet Functions |