Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() ok, programmers... I'm stumped. Writing code to protect a group of sheets, I cannot figure how to prevent users from "Selecting Locked Cells", which is a choice in the Protect Sheet menu. According to VBA, the choices for ActiveSheet.PROTECT a -expression.Protect(Password, DrawingObjects, Contents, Scenarios, UserInterfaceOnly, AllowFormattingCells, AllowFormattingColumns, AllowFormattingRows, AllowInsertingColumns, AllowInsertingRows, AllowInsertingHyperlinks, AllowDeletingColumns, AllowDeletingRows, AllowSorting, AllowFiltering, AllowUsingPivotTables)- Current code looks like this: Code: -------------------- Sub PROTECT() ' Sheets("January").Select ActiveSheet.PROTECT DrawingObjects:=True, Contents:=True, Scenarios:=True,_ AllowFiltering:=True, UserInterfaceOnly:=True Sheets("February").Select ...... End Sub -------------------- I am trying to keep the user in ONLY the 'Unlocked' cells within each sheet. After running the above code, the user is free to move to any cell within the sheet, locked or not. Of course the contents are protected from changes, but can still be selected. Also, when I manually set this option (unchecking "Selecting Locked Cells"), save and close the file, when re-opened the protection is in place, yet all cells can once again be selected. Ideas, anyone? Thanks... Bruce -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=382012 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Allowing editing locked cells in a protected sheet in excel | Excel Worksheet Functions | |||
can a sheet be locked, with exception of some cells in it | Excel Discussion (Misc queries) | |||
paste locked cells and unlocked cells in protected sheet | Excel Worksheet Functions | |||
Locked cells with Protect Sheet. | Excel Discussion (Misc queries) | |||
Still can select locked cells in protected sheet | New Users to Excel |