View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken G. Ken G. is offline
external usenet poster
 
Posts: 37
Default Select locked cells

I've now added the following code to my macro and it fully protects the sheet
....
ActiveSheet.EnableSelection = xlunlockedCells

"Ken G." wrote:

I found a solution to this myself. In this particular sheet there is a print
button which runs a macro which firstly unprotects the sheet, hides some
rows, prints the sheet, unhides the rows, and then re-protects the worksheet.

When I sent the sheet to my colleague I used the print button macro to
protect the worksheet beacause I was too lazy to go to
"tools/protection/protect worksheet" and type in my long, complex password
two times.

When I did use Excel to protect the sheet instead of the macro, the
protection was complete, ie she couldn't select the locked cells, even if she
used the print button macro to unprotect and reprotect the sheet.

Cheers,
Ken G.

"Ken G." wrote:

I have several worksheets distributed to users where the formulas are in
locked cells and when I protect the sheet I always make sure that "Select
Locked cells" is not ticked. One user has shown me a sheet I sent her where
all the formulas are visible, even though the sheet is still protected. I
unprotected the sheet on her PC and looked at her settings and she has
"select locked cells" ticked.

Does her setting override my setting even though the sheet was saved with
the option unticked, and if so how do I overcome this? (Using Excel 2003 SP1)