Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Pat Pat is offline
external usenet poster
 
Posts: 210
Default Worksheet Protection Question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Worksheet Protection Question

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protection Question PT New Users to Excel 1 July 2nd 08 03:57 AM
Worksheet protection question Dominic Excel Discussion (Misc queries) 3 August 17th 07 07:46 PM
A Worksheet Protection Question PA New Users to Excel 1 December 8th 06 09:44 AM
Cell Protection vs. Worksheet Protection kmwhitt Excel Discussion (Misc queries) 4 September 24th 06 02:37 AM
Worksheet protection is gone and only wokbook protection can be se Eric C. Excel Discussion (Misc queries) 4 May 2nd 06 04:50 PM


All times are GMT +1. The time now is 05:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"