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.
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.