PC Review


Reply
Thread Tools Rate Thread

AutoFilter with protected sheets

 
 
ADK
Guest
Posts: n/a
 
      3rd Jul 2007
I have two sheets with autofilter. The code below works for the one sheet.
How can I list the two sheets in this code? Using Excel 2000Private Sub
Workbook_Open()
'check for filter, turn on if none exists
With Worksheets("Data")
If Not .AutoFilterMode Then
.Range("A1").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub


 
Reply With Quote
 
 
 
 
ADK
Guest
Posts: n/a
 
      3rd Jul 2007
Also, The two sheets have different ranges

sheet1: A66
sheet2: C6:I6

"ADK" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have two sheets with autofilter. The code below works for the one sheet.
>How can I list the two sheets in this code? Using Excel 2000Private Sub
>Workbook_Open()
> 'check for filter, turn on if none exists
> With Worksheets("Data")
> If Not .AutoFilterMode Then
> .Range("A1").AutoFilter
> End If
> .EnableAutoFilter = True
> .Protect Password:="password", _
> Contents:=True, UserInterfaceOnly:=True
> End With
> End Sub
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grouping with protected sheets (multiple sheets) Krista Microsoft Excel Misc 0 28th Oct 2009 01:28 PM
autofilter on a protected sheet Dave Unger Microsoft Excel Programming 6 6th Mar 2009 04:52 PM
Using Autofilter on Protected sheets Yogin Microsoft Excel Misc 3 3rd Aug 2008 05:30 PM
Macro for filter on protected workbook that works for all sheets, no matter what sheets are named? StargateFanFromWork Microsoft Excel Programming 6 26th Jan 2006 06:31 PM
Autofilter and protected sheets Edward Robson Microsoft Excel Misc 2 1st Dec 2003 12:23 PM


Features
 

Advertising
 

Newsgroups
 


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