Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro doesn't work when I use Protection
I have a macro to insert rows in my worksheet. When I turn on protection, so
user can only access unlocked cells, my macro will not work. How can I use both the macro and the protection option? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro doesn't work when I use Protection
unprotect your worksheet before you do your code and then protect when done
ie... you can remove the password key word if there is no password ie activesheet.unprotect sub insertrows() activesheet.unprotect password:="enter your password here" 'insert rows edit cells whatever here activesheet.protect password:="enter your password here" end sub -- When you lose your mind, you free your life. "Janet H." wrote: I have a macro to insert rows in my worksheet. When I turn on protection, so user can only access unlocked cells, my macro will not work. How can I use both the macro and the protection option? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro doesn't work when I use Protection
Is there a way to have a password on a sheet or workbook and have VBA still
unlock and protect with same password after. At present I try and get box to enter password. Any ideas Thanks a lot Curt "ben" wrote: unprotect your worksheet before you do your code and then protect when done ie... you can remove the password key word if there is no password ie activesheet.unprotect sub insertrows() activesheet.unprotect password:="enter your password here" 'insert rows edit cells whatever here activesheet.protect password:="enter your password here" end sub -- When you lose your mind, you free your life. "Janet H." wrote: I have a macro to insert rows in my worksheet. When I turn on protection, so user can only access unlocked cells, my macro will not work. How can I use both the macro and the protection option? |
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 | |||
2007 vs 2003 - work protection | Excel Discussion (Misc queries) | |||
protection is not work. | Excel Worksheet Functions | |||
work sheet protection | Excel Discussion (Misc queries) | |||
using protection (but allowing a combobox to still work) | Excel Programming |