Protected Worksheet: All cells except 1 need to be locked

gingersnaps212

New Member
Joined
Jul 27, 2010
Messages
9
I have a worksheet in which a user selects from a drop down list and from there everything else is filled out. In order to protect this and prevent users from messing up the form (thus preventing numerous headaches for me), I want to lock all cells except for this one cell containing the drop down list.

Below is the code I have:
With Sheets("Spreadsheet")
.Unprotect Password:="PSWHere"
.Cells.Locked = True
.Range("G8").Locked = False
.Protect Password:="PSWHere"
End With

But, I am getting the following error:
Run-time error 1004: Unable to set the Locked property of the Range class

I am using Excel 2003 and VB 6.5. Any help and/or suggestions would be greatly appreciated.
 
Mine is currently working. We'll see what happens when I turn my computer back on tomorrow.

Going home now and taking your signature's advice. A nice glass of Oban 14 yr will hopefully get rid of this headache :)
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,216,119
Messages
6,128,946
Members
449,480
Latest member
yesitisasport

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