|
-
Jun 23rd, 2006, 04:38 AM
#1
[RESOLVED] excel protection question
If a sheet is protected, is it possible to disable selection / activation of locked cells?
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 23rd, 2006, 04:56 AM
#2
Hyperactive Member
Re: excel protection question
first unprotect sheet
then format>sheet>unhide
for unprotecting sheet loads of code available ..use google.
-
Jun 23rd, 2006, 06:32 AM
#3
Re: excel protection question
 Originally Posted by indiewolf
first unprotect sheet
then format>sheet>unhide
for unprotecting sheet loads of code available ..use google.
Not sure what you mean. Are you referring to the format menu? The sheet is not hidden. As for unprotecting the sheet, I've got the line of code to do that.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 23rd, 2006, 09:24 AM
#4
Re: excel protection question
To only allow the use to select/activate unlocked cells, use the EnableSelection property of the sheet before you cal the Protect method.
VB Code:
With ThisWorkbook.Worksheets(1)
.EnableSelection = xlUnlockedCells
.Protect Password:="declan"
End With
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Jun 25th, 2006, 03:32 AM
#5
Re: excel protection question
 Originally Posted by DKenny
To only allow the use to select/activate unlocked cells, use the EnableSelection property of the sheet before you cal the Protect method.
VB Code:
With ThisWorkbook.Worksheets(1)
.EnableSelection = xlUnlockedCells
.Protect Password:="declan"
End With
Thanks, do you know if this is going to work for Excel versions older than 2000 as well? I can't test it at the moment.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
-
Jun 26th, 2006, 03:00 AM
#6
Re: [RESOLVED] excel protection question
I've just tested it under Win98 / Excel 97 and it does work, so you can't disable locked cell selection by means of the Protect -> Sheet menu, but your code does the job.
Thanks again, DK.
Lottery is a tax on people who are bad at maths
If only mosquitoes sucked fat instead of blood...
To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|