LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autofilter protected sheet


Hello, I have used the code below to unlock the autofilter on
protected sheet in excel. I'm not very good at VBA, so could someon
tell me how to change it so that it works for all of the sheets in th
workbook instead of just 2005?

Thanks

Private Sub Workbook_Open()
'check for filter, turn on if none exists
With Worksheets("2005")
If Not .AutoFilterMode Then
.Range("A4:C4").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Su

--
veci
-----------------------------------------------------------------------
vecia's Profile: http://www.excelforum.com/member.php...nfo&userid=211
View this thread: http://www.excelforum.com/showthread.php?threadid=46640

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofilter not working on protected sheet. parahumanoid[_2_] Excel Discussion (Misc queries) 1 November 1st 09 05:52 PM
Use autofilter with macro in a protected sheet Minos Excel Discussion (Misc queries) 1 August 4th 09 03:44 PM
Autofilter in protected sheet Javier Excel Worksheet Functions 5 March 24th 08 05:56 PM
Applying autofilter to protected sheet Brian Ferris Excel Discussion (Misc queries) 2 November 18th 05 04:28 PM
AutoFilter on a Protected sheet Olle[_2_] Excel Programming 1 June 15th 04 08:12 AM


All times are GMT +1. The time now is 12:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"