View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Auto-Filter Not Working With Protection Turned On

If you already have the outline/subtotals applied, you can protect the worksheet
in code (auto_open/workbook_open??).

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
'.EnableOutlining = True
.EnableAutoFilter = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

iwgunter wrote:

I am using columns A-L with content. I want certain cols to be protected
as they bring inthe dynamic content.

Firstly, I selected the whole worksheet [ctrl+a], right clicked and
took the tick out of Locked, I then highlighted the whole of cols G, H,
I & K by clicking on the column letter and checked the Locked box. I
then highlighted the whole of row 1 as this is the column headers and I
have auto-filter running and unchecked the Locked box. Then I applied
the protection so the cells can't be changed.

But now the auto-filter won't work. Is this a known problem with
Excel?

I'm using Excel 2000 [9.0.2720]

Ta
Ian

--
iwgunter
------------------------------------------------------------------------
iwgunter's Profile: http://www.excelforum.com/member.php...o&userid=15441
View this thread: http://www.excelforum.com/showthread...hreadid=513526


--

Dave Peterson