Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using Excel 2007 Beta, and I use the code below during the running of my
macro. The strange thing is that before I exit the workbook I cannot select locked cells (this is as it should be, only want to select unlocked cells) but when the workbook is reopened, worksheet protection is still turned on, but I can now select locked cells. Sub Protect_All_Sheets() ' ' Protect_All_Sheets ' ' With ThisWorkbook .Worksheets("June - August").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.EnableSelection = xlUnlockedCells .Worksheets("September - November").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.EnableSelection = xlUnlockedCells .Worksheets("December - February").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.EnableSelection = xlUnlockedCells .Worksheets("March - May").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.EnableSelection = xlUnlockedCells End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Strange behavior | Excel Discussion (Misc queries) | |||
Strange TAB behavior | Excel Programming | |||
Strange behavior | Setting up and Configuration of Excel | |||
Strange behavior. | Excel Discussion (Misc queries) | |||
Strange Worksheet Protection | Excel Programming |