Excel/Auto Filter in Procted Sheet

  • Thread starter Thread starter Abdul
  • Start date Start date
A

Abdul

Hi! will someone tell me that how to use Auto Filter when WorkSheet i
protected.

Because when i protect a work sheet, Date\AutoFilter does not work.

Thanks in advance

Jabee
 
Which XL Version? 2003 (XP) enables you to leave the filters available.
Otherwise, are you any good with VBA? Does your organisation's security
policy permit macros?

Ensure Cells, Protection for the cells = Locked

Then, in the Worksheet Module (Right-click the Worksheet tab and select View
Code), paste this:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Locked = True Then
Application.Undo
End If
Application.EnableEvents = True
End Sub
 
Abdul, here is another way using user interface only to protect the sheet

Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="test", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
I tried and pasted the code in work sheet module but it is no
working....

What i want is:
I want a protected worksheet with AutoFilter enabled.

Still i am not able to understand how to do it.

You people are very nice, will you explain it in a bit more detail.

I am unsing Excel 2002.


Thanks in advance for your advices.

Jabee
 
In Excel 2002, apply an AutoFilter to the list (select a cell in the
list, and choose Data>Filter>AutoFilter)

Then, to protect the worksheet, choose Tools>Protection>Protect Sheet
Add a check mark to 'Use AutoFilter', and click OK

The sheet will be protected, and you can use the AutoFilter
 
Back
Top