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
 
Gibbs,

Thanks for the update.

I haven't worked much with other versions than 2003 and 97, and 97 was too long ago to remember the protection properties.

Hal,

I'm curious what version of Excel you're using.

RAM
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Well, I work with Microsoft XP, Broken Edition. Complete with the Errors.DLL

So I am used to all the "fun" things those geniuses at Microsoft come up with. :)
 
Upvote 0
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 marked) - 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.
Hal,

I just realized I forgot to add the link to the topic I mentioned in above quote. Here it is:

http://www.mrexcel.com/board2/viewtopic.php?t=183754&highlight=protection

HTH

RAM
 
Upvote 0
Arrrggg,
When I close and save the spreadsheet and re-open it, the "Enable Selection" in the VB window changes back to NoRestrictions when I changed it to UnlockedCells even after I saved before closing. I even added the code EnableSelection = xlUnlockedCells for that specific tab and that doesn't help.

Anyone know what I can do?

~Hal
 
Upvote 0
OK, I tried that and it works just as well as the "Enable Selection", but doesn't save when I close & save then re-open.

Maybe I'm just n ot saving the VB window correctly.

~Hal
 
Upvote 0
You set the scroll area on the worksheet activate using VBA.

IE on the worksheet active you place code like this

activesheet.scrollarea = "A1:B1"
 
Upvote 0
Yup, That's what I did.....

but when I save and close, then re-open...it changes back to the default.

~Hal
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,917
Members
449,093
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top