Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for protecting sheet
I have recorded a macro that protects a sheet. The coding that I have is
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True When I protect the sheet I want it so that only Unlocked cells can be selected. My coding above does not do this. What do I need to do to my code to make it so that a user cannot select Unlocked cells, and only allow the user to select only Unlocked cells. Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for protecting sheet
look for enableselection in VBA's help.
You'll see a nice example. JoeP wrote: I have recorded a macro that protects a sheet. The coding that I have is ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True When I protect the sheet I want it so that only Unlocked cells can be selected. My coding above does not do this. What do I need to do to my code to make it so that a user cannot select Unlocked cells, and only allow the user to select only Unlocked cells. Thanks. -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro for protecting sheet
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlUnlockedCells Gord Dibben MS Excel MVP On Mon, 26 Nov 2007 15:06:01 -0800, JoeP wrote: I have recorded a macro that protects a sheet. The coding that I have is ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True When I protect the sheet I want it so that only Unlocked cells can be selected. My coding above does not do this. What do I need to do to my code to make it so that a user cannot select Unlocked cells, and only allow the user to select only Unlocked cells. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Protecting sheet that has macro | Excel Worksheet Functions | |||
Can't use tab after protecting sheet. | Excel Worksheet Functions | |||
Protecting Sheet | Excel Worksheet Functions | |||
macro for Protecting a Sheet | Excel Discussion (Misc queries) | |||
Can't use tab after protecting sheet. | Excel Discussion (Misc queries) |