PC Review


Reply
Thread Tools Rate Thread

Autofilter on hidden sheet

 
 
JLR-Mart
Guest
Posts: n/a
 
      2nd Apr 2009
Does anyone know if it is possible to use autofilter on a hidden worksheet. I
know that as a workaround I can make it visible, do the do, and then make it
hidden again, but out of curiosity I wondered whether this is some sort of
restriction??

We've tried several methods without any success.

Any help greatly appreciated
 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      2nd Apr 2009
You can filter on a hidden sheet but not a protected one unless you allow
filtering. What methods have you tried?

--

Regards,
Nigel
(E-Mail Removed)



"JLR-Mart" <(E-Mail Removed)> wrote in message
news:C2A4658C-22E2-4965-93C1-(E-Mail Removed)...
> Does anyone know if it is possible to use autofilter on a hidden
> worksheet. I
> know that as a workaround I can make it visible, do the do, and then make
> it
> hidden again, but out of curiosity I wondered whether this is some sort of
> restriction??
>
> We've tried several methods without any success.
>
> Any help greatly appreciated


 
Reply With Quote
 
JLR-Mart
Guest
Posts: n/a
 
      2nd Apr 2009
Our code looks something like this:

Worksheets("BPNO_CPSCII").Activate
Range("A1:G1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="<>*" & CPSC & "*"

BUT when it runs it filters the currently visible sheet and NOT the hidden
one (BPNO_CPSCII) as required

"Nigel" wrote:

> You can filter on a hidden sheet but not a protected one unless you allow
> filtering. What methods have you tried?
>
> --
>
> Regards,
> Nigel
> (E-Mail Removed)
>
>
>
> "JLR-Mart" <(E-Mail Removed)> wrote in message
> news:C2A4658C-22E2-4965-93C1-(E-Mail Removed)...
> > Does anyone know if it is possible to use autofilter on a hidden
> > worksheet. I
> > know that as a workaround I can make it visible, do the do, and then make
> > it
> > hidden again, but out of curiosity I wondered whether this is some sort of
> > restriction??
> >
> > We've tried several methods without any success.
> >
> > Any help greatly appreciated

>
>

 
Reply With Quote
 
Nigel
Guest
Posts: n/a
 
      2nd Apr 2009
Yes but you cannot activate a hidden sheet.

Change your code to

With Worksheets("BPNO_CPSCII").Range("A1:G1")
.AutoFilter
.AutoFilter Field:=1, Criteria1:="<>*" & CPSC & "*"
End With


In general you never need to select before acting on a worksheet or its
objects.

--

Regards,
Nigel
(E-Mail Removed)



"JLR-Mart" <(E-Mail Removed)> wrote in message
news:285205A9-3A8F-4DD9-95F8-(E-Mail Removed)...
> Our code looks something like this:
>
> Worksheets("BPNO_CPSCII").Activate
> Range("A1:G1").Select
> Selection.AutoFilter
> Selection.AutoFilter Field:=1, Criteria1:="<>*" & CPSC & "*"
>
> BUT when it runs it filters the currently visible sheet and NOT the hidden
> one (BPNO_CPSCII) as required
>
> "Nigel" wrote:
>
>> You can filter on a hidden sheet but not a protected one unless you allow
>> filtering. What methods have you tried?
>>
>> --
>>
>> Regards,
>> Nigel
>> (E-Mail Removed)
>>
>>
>>
>> "JLR-Mart" <(E-Mail Removed)> wrote in message
>> news:C2A4658C-22E2-4965-93C1-(E-Mail Removed)...
>> > Does anyone know if it is possible to use autofilter on a hidden
>> > worksheet. I
>> > know that as a workaround I can make it visible, do the do, and then
>> > make
>> > it
>> > hidden again, but out of curiosity I wondered whether this is some sort
>> > of
>> > restriction??
>> >
>> > We've tried several methods without any success.
>> >
>> > Any help greatly appreciated

>>
>>


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      2nd Apr 2009
You can't activate a hidden sheet. But the good thing is that you don't need
to.

with Worksheets("BPNO_CPSCII")
.autofiltermode = false 'remove any existing filter.
.Range("A1:G1").AutoFilter Field:=1, Criteria1:="<>*" & CPSC & "*"
end with

JLR-Mart wrote:
>
> Our code looks something like this:
>
> Worksheets("BPNO_CPSCII").Activate
> Range("A1:G1").Select
> Selection.AutoFilter
> Selection.AutoFilter Field:=1, Criteria1:="<>*" & CPSC & "*"
>
> BUT when it runs it filters the currently visible sheet and NOT the hidden
> one (BPNO_CPSCII) as required
>
> "Nigel" wrote:
>
> > You can filter on a hidden sheet but not a protected one unless you allow
> > filtering. What methods have you tried?
> >
> > --
> >
> > Regards,
> > Nigel
> > (E-Mail Removed)
> >
> >
> >
> > "JLR-Mart" <(E-Mail Removed)> wrote in message
> > news:C2A4658C-22E2-4965-93C1-(E-Mail Removed)...
> > > Does anyone know if it is possible to use autofilter on a hidden
> > > worksheet. I
> > > know that as a workaround I can make it visible, do the do, and then make
> > > it
> > > hidden again, but out of curiosity I wondered whether this is some sort of
> > > restriction??
> > >
> > > We've tried several methods without any success.
> > >
> > > Any help greatly appreciated

> >
> >


--

Dave Peterson
 
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
Rows hidden by Autofilter vs hidden by changing the Hidden property LEO@KCC Microsoft Excel Programming 4 11th Sep 2007 10:14 AM
I need my Hidden Rows to stay hidden when I print the sheet. =?Utf-8?B?Um9zYWxpZXdvbw==?= Microsoft Excel Misc 2 20th Jul 2006 07:51 PM
Saving hidden data with a worksheet (preferably without using a hidden sheet) Aaron Queenan Microsoft Excel Programming 3 21st Jan 2004 04:39 PM
AutoFilter and Hidden Rows Greg Bloom Microsoft Excel Programming 1 25th Sep 2003 11:16 PM
Re: Is it possible to tell if a cell is hidden by 'Autofilter' Tom Ogilvy Microsoft Excel Programming 2 6th Sep 2003 07:57 PM


Features
 

Advertising
 

Newsgroups
 


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