Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the protect option
I have a worksheet that has protection switched on. When a certain routine is
run I need to turn the protection off do the routine then turn it back on again. When I initially protect the worksheet I need to set the Edit Objects so that my routines will run properly. Unfortunately I can't seem to set that back on again when I turn the protect back on inside my code. Is there a way to turn the protect back on and use edit object from within VBA? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the protect option
This is the code I generally use
'Unprotect ActiveSheet.Unprotect password:="XXX" 'Protect With ActiveSheet .EnableSelection = xlNoRestrictions .Protect Contents:=True, password:="XXX", DrawingObjects:=True, UserInterfaceOnly:=False End With -- caroline "Keith" wrote: I have a worksheet that has protection switched on. When a certain routine is run I need to turn the protection off do the routine then turn it back on again. When I initially protect the worksheet I need to set the Edit Objects so that my routines will run properly. Unfortunately I can't seem to set that back on again when I turn the protect back on inside my code. Is there a way to turn the protect back on and use edit object from within VBA? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the protect option
Yes but I cant seem to find a command for setting the EditObject part of
protect. "caroline" wrote: This is the code I generally use 'Unprotect ActiveSheet.Unprotect password:="XXX" 'Protect With ActiveSheet .EnableSelection = xlNoRestrictions .Protect Contents:=True, password:="XXX", DrawingObjects:=True, UserInterfaceOnly:=False End With -- caroline "Keith" wrote: I have a worksheet that has protection switched on. When a certain routine is run I need to turn the protection off do the routine then turn it back on again. When I initially protect the worksheet I need to set the Edit Objects so that my routines will run properly. Unfortunately I can't seem to set that back on again when I turn the protect back on inside my code. Is there a way to turn the protect back on and use edit object from within VBA? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting the protect option
Why not setting the individual object property to unlock?
-- caroline "Keith" wrote: Yes but I cant seem to find a command for setting the EditObject part of protect. "caroline" wrote: This is the code I generally use 'Unprotect ActiveSheet.Unprotect password:="XXX" 'Protect With ActiveSheet .EnableSelection = xlNoRestrictions .Protect Contents:=True, password:="XXX", DrawingObjects:=True, UserInterfaceOnly:=False End With -- caroline "Keith" wrote: I have a worksheet that has protection switched on. When a certain routine is run I need to turn the protection off do the routine then turn it back on again. When I initially protect the worksheet I need to set the Edit Objects so that my routines will run properly. Unfortunately I can't seem to set that back on again when I turn the protect back on inside my code. Is there a way to turn the protect back on and use edit object from within VBA? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mofiying the protect option. | Excel Worksheet Functions | |||
setting up option buttons | Excel Worksheet Functions | |||
Setting an option control | Excel Programming | |||
How to protect option button? | Excel Programming | |||
How to protect option button? | Excel Worksheet Functions |