View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Raj[_2_] Raj[_2_] is offline
external usenet poster
 
Posts: 150
Default Locking cells in Auto filtered list

Hi,

I have list in worksheet that is enabled for autofilter.

The before save event of the workbook has code to protect the sheet
when saved. This is prevent further data entry until the user invokes
a macro to unprotect the sheet.

The protect sheet macro has the following code:
Worksheets("InputDetails").Cells.Locked = True

All is well as long as the worksheet is unfiltered and saved. But when
the list is filtered and a save attempted, the code fails and the line
above is highlighted. Obviously, it is failing to lock cells in
filtered lists.

Any solutions for this please?

Thanks in advance for the help.

Regards,
Raj