Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 97.
I have a worksheet of data with read-only access which has a column with a formatted column of dd-mmm-yy (by another department!). I am trying to filter it with VBA. I have done the following but failing to get the required information returned! dim StartDate as date Selection.AutoFilter Selection.AutoFilter Field:=2, Criteria1:="=" & StartDate & "", Operator:= _ xlAnd Can someone offer me a workaround, please? -- Mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mark,
Try changing: Criteria1:="=" & StartDate & "", to Criteria1:="=" & CLng(StartDate) --- Regards, Norman "Mark" wrote in message ... I am using Excel 97. I have a worksheet of data with read-only access which has a column with a formatted column of dd-mmm-yy (by another department!). I am trying to filter it with VBA. I have done the following but failing to get the required information returned! dim StartDate as date Selection.AutoFilter Selection.AutoFilter Field:=2, Criteria1:="=" & StartDate & "", Operator:= _ xlAnd Can someone offer me a workaround, please? -- Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Displaying AutoFilter criteria | Excel Programming | |||
Why won't it work when I use VBA to set autofilter criteria to ce. | Excel Programming | |||
Autofilter Multiple Criteria | Excel Programming | |||
AutoFilter Criteria VBA | Excel Programming | |||
VBA Autofilter Criteria | Excel Programming |