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: 923
Default Autofilter - Applying changes

Hi All
I am using an autofilter under VBA control. To set up the customer
conditions I record the macro and adapt the code as required.

Manually the filter works ok, and the resulting code is created and the
filter acts immediately on the datalist showing only those meeting the
criteria specified. The filter relate to some date ranges shown on the sheet
in European format.

If I remove the filter and run the recorded macro, the filter is put in
place, the Custom conditions are set BUT all rows are filtered. If I open
the filter to check the criteria settings, they are as requested by the
macro. If I then click OK on the filter the resultant list is filtered
correctly with conditions being applied correctly !!

I suspect it is to do with the DATES - but cannot reconcile the difference
between the Manual application and the VBA macro? Thoughts anyone?

Using Xl97 (v8) as the target application, but I get the same in xlXP (v10).

Recorded (unedited code below)

Range("A4:C4").Select
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:="=19/10/2005", Operator:=xlAnd
_
, Criteria2:="=15/11/2005"


--
Cheers
Nigel




 
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
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
Counting the no. of entries after applying autofilter 1max Excel Discussion (Misc queries) 2 June 22nd 06 06:30 AM
Applying an AutoFilter to a string Hardip Excel Discussion (Misc queries) 3 April 16th 06 05:32 PM
Applying autofilter to protected sheet Brian Ferris Excel Discussion (Misc queries) 2 November 18th 05 04:28 PM
How To Count Rows Displayed After Applying AutoFilter Steve[_32_] Excel Programming 2 August 12th 03 02:45 PM


All times are GMT +1. The time now is 11:24 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"