Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 excel autofilter change back to 2003 autofilter? | Excel Discussion (Misc queries) | |||
Counting the no. of entries after applying autofilter | Excel Discussion (Misc queries) | |||
Applying an AutoFilter to a string | Excel Discussion (Misc queries) | |||
Applying autofilter to protected sheet | Excel Discussion (Misc queries) | |||
How To Count Rows Displayed After Applying AutoFilter | Excel Programming |