Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SB SB is offline
external usenet poster
 
Posts: 4
Default Advanced Filter problem

Folks,

I have an excel file which is used as a database of contact
information. There are several macro buttons which the user can use
to show the whole list or to filter the list. The VBA code uses the
AdvancedFilter command...

Range("sysFilterList").AdvancedFilter Action:=xlFilterInPlace,
CriteriaRange:= _
Range("sysCriteria"), Unique:=False

The file operates correctly on many machines in the office, most of
whom are running Windows 2000 & Excel 2000.

A colleague who runs Windows XP and Excel 2003 cannot use the file as
the procedure hangs at this line of code. On escaping out of the code
I get the error message "AdvancedFilter method of range class failed".

Can anyone out there guess why this file isn't working on my
colleague's machine?

Thanks in advance

Stuart
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Advanced Filter problem

Hi
I occasionally got this if I didn't activate the sheet where the
AdvancedFilter was taking place. So you might try putting in something
like
Range("sysFilterList").Parent.Activate

before the filter (or YourSheet.Activate if it is a fixed sheet).

I don't know if a filter being in place already might cause a problem.
If it does you can remove it with

With Range("sysFilterList").Parent
On Error Resume Next 'required if Advanced filter used
.ShowAllData
On Error GoTo 0
.AutoFilterMode = False 'Removes drop down arrows
End With

before you filter

regards
Paul

Reply
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
Advanced Filter Problem Mustang Excel Discussion (Misc queries) 3 May 9th 09 08:28 AM
Excel advanced filter problem CAM Excel Discussion (Misc queries) 0 February 22nd 08 01:16 AM
Advanced Filter problem R. Choate Excel Discussion (Misc queries) 14 May 28th 06 09:12 PM
Problem using Advanced filter anandmr65 Excel Discussion (Misc queries) 1 April 17th 06 10:14 AM
Problem in using Advanced Filter Shilps[_2_] Excel Programming 5 August 16th 04 09:22 PM


All times are GMT +1. The time now is 11:06 AM.

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

About Us

"It's about Microsoft Excel"