|
-
Jun 8th, 2006, 03:08 AM
#1
Thread Starter
Fanatic Member
Locking cell...
hi guys!!! i have a question, how can i locked the sheet with only 'select unlocked cells' enabled. at present i only have this code which locked and unlocked sheet but with 'select locked cells' and 'select unlocked cells' enabled..but i only want 'select unlocked cells' enabled. thanks in advance!!!
VB Code:
Sheet1.Unprotect ("bcmd")
Sheet1.Protect ("bcmd")
-
Jun 8th, 2006, 08:10 AM
#2
Re: Locking cell...
VB Code:
Sheet1.Protect ("bcmd")
Sheet1.EnableSelection = xlUnlockedCells
Declan
Don't forget to mark your Thread as resolved.
Take a moment to rate posts that you think are helpful 
-
Jun 8th, 2006, 06:47 PM
#3
Thread Starter
Fanatic Member
Re: Locking cell...
Thanks a bunch!!! DKenny!
-
Jun 8th, 2006, 07:07 PM
#4
Thread Starter
Fanatic Member
Re: Locking cell...
wait..i still have a problem...i've already try your code and it works but when I save my excel document and close it and open it again the cells that are locked is can be selected again..why is that so? I dont want locked cells to be selected. thanks in advance!
-
Jun 8th, 2006, 07:10 PM
#5
Addicted Member
Re: Locking cell...
Just put DKenny's code in the "ThisWorkbook" module in an open event:
VB Code:
Private Sub Workbook_Open()
-
Jun 8th, 2006, 07:31 PM
#6
Thread Starter
Fanatic Member
Re: Locking cell...
is there any other solution aside from putting it from
VB Code:
Private Sub Workbook_Open()
?
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
|