View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Martyn Martyn is offline
external usenet poster
 
Posts: 80
Default run macros on a protected sheet?

I' am glad that I underestood the same...
Thanks to Tom as well. AFAIK he is among the best around here...and I love
keep following his answers.


"Chip Pearson" wrote in message
...
Martyn,

You can certainly unprotect the sheet within the procedure, and
then protect it at the end. E.g.,

Worksheets("Sheet1").Unprotect 'password:="whatever"
' your code here
Worksheets("Sheet1").Protect 'password:="whatever"



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Martyn" wrote in message
...
Chip,
My additional question is: Are you sure that one cannot

unprotect sheet
whitin a macro, make changes to cells, protect the sheet again

and exit?
I'll be much obliged if you or anyone else could answer.

"Chip Pearson" wrote in message
...
Joe,

If the procedure changes cells, you must unprotect the sheet
prior to executing the macro.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Joe Z" wrote in

message
...
Is it possible to run a macro on a protected sheet? I've
tried and tried but I can't figure it out. Thanks.