Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autofilter not working when the sheet is password protected

Status
Not open for further replies.

mudflap

MIS
Feb 14, 2002
194
CA
After I password the excel sheet the autofilter portions do not work on my excel sheet.
Microsoft website said add the following but I can't get it to work.

Private Sub Workbook_Open()
Sheet1.Protect password:="sas", DrawingObjects:=True, contents:=True, Scenarios:=True, userinterfaceonly:=True
Sheet1.EnableAutoFilter = True
End Sub

Thanks
Peter
 
Hi Peter,

do you have autofilter switched on in this sheet? ( i.e. when it is saved )

This code will enable an existing filter to operate, it won't switch on autofiltering.

Glenn.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top