Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a worksheet where I want to lock cells and unlocked.
After I protect the sheet.... -I want to be able to have users input data in unlocked cells -I want users to be able to select certain locked cells -I also want users to NOT be able to select certain locked cells Is this possible? If yes, how? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The first is the way unlocked cells on protected worksheets behave.
The last two is not. If you're using xl2002+, you could stop the user from selecting all locked cells. But that breaks rule #2. Maybe you could use an event macro that checks the selection and stops the user from selecting one of those "unselectable" cells. But if macros or events are disabled, then this won't work. If you want to try, select all the cells that shouldn't be selected. (It won't matter if the worksheet is protected and it won't matter if the cells are locked/unlocked.) Give that range a nice name. I used "UnSelectable" Then rightclick on the worksheet tab that should have this behavior and select view code. Paste this into the newly opened code window: Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Me.Range("unselectable")) Is Nothing Then 'do nothing Else 'send them somewhere else Application.EnableEvents = False Me.Range("a1").Select Application.EnableEvents = True End If End Sub Then back to excel and test it. Remember... if macros or events are disabled, then this won't work. Pat wrote: I have a worksheet where I want to lock cells and unlocked. After I protect the sheet.... -I want to be able to have users input data in unlocked cells -I want users to be able to select certain locked cells -I also want users to NOT be able to select certain locked cells Is this possible? If yes, how? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protection Question | New Users to Excel | |||
Worksheet protection question | Excel Discussion (Misc queries) | |||
A Worksheet Protection Question | New Users to Excel | |||
Cell Protection vs. Worksheet Protection | Excel Discussion (Misc queries) | |||
Worksheet protection is gone and only wokbook protection can be se | Excel Discussion (Misc queries) |