Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I run the code it doesn't return any records but if I substitute the
actual date in the criteriai it returns the correct records sub test() Dim birthdate As Date Dim birthdate1 As Date birthdate = Range("Form!C47") ' this value is 12/1/05 when you hover over "birthdate" birthdate1 = Range("Form!C48") ' This value is 12/31/05 when you hover over "birthdate1" Sheets("Records").Select Range("J2").Select Selection.AutoFilter This filter returns no records Selection.AutoFilter Field:=10, Criteria1:="=(birthdate)", Operator:=xlAnd, _ Criteria2:="<=(birthdate1)" This filter returns no records Selection.AutoFilter Field:=10, Criteria1:="=12/1/05", Operator:=xlAnd, _ Criteria2:="<=(12/31/05" endsub What I am I doing wrong? oldjay |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
How to make a button VBA code reference other VBA code subroutines??? | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |