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: 3
Default Problem with autofilter in VBA

Can anyone help me explain why the following code does not work. It appears
to be a bug in Excel 2003.

This is a simple spreadsheet that contains a command button that calls a
small piece of vba code to do an autofilter on a range of dates.

Rows("1:1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:="1/01/2003", Operator:=xlAnd,
Criteria2:="<31/03/2003"

When the line is executed, it returns no data, however if you manually go
into the autofilter drop down the values are there and a simple OK to the
dialogue box will return the correct results.

The spreadsheet contains the following

Record Number Date
1 2/01/2003
2 1/02/2003
3 1/03/2003
4 1/04/2003
5 1/04/2003
6 1/05/2003


The code above should return record numbers 1 thru 3, but it displays no
lines of code util you go in manually


Am I missing something?




 
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
Autofilter Problem Oscar Excel Discussion (Misc queries) 2 February 11th 10 03:51 PM
AutoFilter Problem Dennis Excel Discussion (Misc queries) 1 October 22nd 08 05:28 AM
PROBLEM WITH AUTOFILTER OMIDF New Users to Excel 1 August 18th 06 05:41 PM
PROBLEM WITH AUTOFILTER OMIDF New Users to Excel 0 August 18th 06 05:36 PM
Autofilter problem Jake Excel Worksheet Functions 1 July 5th 05 12:12 PM


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