Locking cells

halcyoneus

Board Regular
Joined
Mar 26, 2003
Messages
147
Well, I want to do more then just lock cells....

I have a little program whipped up in ecxel and I don't want anyone to be able to modify any cells except cells A1 or A2. I've been able to do this using the Validation function in Excel, but want to go 1 step further. I don't even want anyone to be able to select any other cells. If they do, I want the selection to automatically select either A1 or A2.

Anyone have any ideas to help?

~Hal
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

RAM

Well-known Member
Joined
Oct 4, 2004
Messages
1,862
Hal,

Hold down Ctrl and select the two cells you want the user to be able to select. Format - Cells and unselect Locked in the protection tab - OK. Then Tools - Protection and select Protect Sheet. Unselect Select locked cells,
(make sure only Select unlocked cells is maked) - OK.

Edit: The second post in this topic also tells you how to dock the protection toolbar in the menu. It will speed things up when you're working with protections.

HTH

RAM
 

halcyoneus

Board Regular
Joined
Mar 26, 2003
Messages
147
That is a better way of protecting the sheet then I was doing....but is there any way to not allow any other cell to even be selected?

~Hal
 

RAM

Well-known Member
Joined
Oct 4, 2004
Messages
1,862
Hal,

Your way of protecting is good too. It protects the sheet from incorrect values. Good job on that one.

....but is there any way to not allow any other cell to even be selected?
Yes, just follow my instructions above. I use that all the time.
Tools - Protection and select Protect Sheet. Unselect Select locked cells,
(make sure that only Select unlocked cells is marked)

HTH

RAM
 

halcyoneus

Board Regular
Joined
Mar 26, 2003
Messages
147

ADVERTISEMENT

quote:
--------------------------------------------------------------------------------
Tools - Protection and select Protect Sheet. Unselect Select locked cells,
(make sure only Select unlocked cells is maked)
--------------------------------------------------------------------------------

I don't see that option when I go into Tools, Protection, Protect sheet(Bolded in quote). There are 3 check boxes....Contents, Objects, and Scenarios.

What am I missing?

~Hal
 

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
Hmmm,

the only place I have seen this is in the VB window, with respect to Sheet properties... "Enable Selection" which has the option to only allow unlocked cells to be selected.

[/img]
 

RAM

Well-known Member
Joined
Oct 4, 2004
Messages
1,862

ADVERTISEMENT

I don't know. You should have 15 selections. What version of Excel are you using?

Anybody else on this one?

RAM
 

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
I think that 15 options choice is only in 2003 forward RAM.

You can right click the sheet and select view code.

In the toolbar select view>properties window

In the object explorer click the sheet that you need to make the change

in the properties window, change the Enable Selection property as needed.
 

halcyoneus

Board Regular
Joined
Mar 26, 2003
Messages
147
Hmmm,

the only place I have seen this is in the VB window, with respect to Sheet properties... "Enable Selection" which has the option to only allow unlocked cells to be selected.

Got it....
Going off your comments here Gibbs, I found the "Enable Selection" in the VB window. I protected the sheet like RAM suggested and changed the "Enable Selection" to 1 - xlUnlockedCells.

Thanks for both of you for your help.

~Hal
 

Watch MrExcel Video

Forum statistics

Threads
1,119,134
Messages
5,576,292
Members
412,715
Latest member
amazingscan
Top