View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Sheet Protection

You must run it everytime you open the workbook
Copy it in the workbook open event

See
http://www.cpearson.com/excel/events.htm




--
Regards Ron de Bruin
http://www.rondebruin.nl



"Maistrye" wrote in message
...

I have a macro to automatically protect my sheets. This macro is
designed to only allow the selection of Unlocked Cells.

ActiveSheet.Protect "a"
ActiveSheet.EnableSelection = xlUnlockedCells

It works fine for every sheet I've used it on up until I re-load it
after I've saved it. (Namely, the locked cells can't be selected, but
the unlocked ones can.)

When I re-open the workbook, the sheet is still protected, but I can
select Locked Cells and Unlocked Cells. (Only the Unlocked ones can be
editted, of course.)

Does anyone know of a way to fix this? ie. Change my macro so that
this problem does not occur?

Thanks,
Scott


--
Maistrye
------------------------------------------------------------------------
Maistrye's Profile: http://www.excelforum.com/member.php...o&userid=36078
View this thread: http://www.excelforum.com/showthread...hreadid=566192