I want to protect all sheets in my workbook except for a few cells. When I do this I still want to be able to run my macros.
How do I do this?
I want to protect all sheets in my workbook except for a few cells. When I do this I still want to be able to run my macros.
How do I do this?
Last edited by scara; 01-27-2011 at 12:15 PM.
Hello scara,
Put this code in "This Workbook" using VB
![]()
Please Login or Register to view this content.
You can either add a line to the start of the code to unprotect the sheets, then restore protection at the end, or use ProtectWithUserInterface
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
follow up question. How do I write this code if I only want shhe3 shhet to be protected?
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
Do you mean
![]()
Please Login or Register to view this content.
Last edited by royUK; 01-27-2011 at 01:32 PM.
Not quite I get an error message, run time error object required. please help with the whole code
Maybe it is something like![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks