Error "Object variable or With block variable not set" occurs he
rng1.Copy Destination:=destSh.Range("A1")
Fix - Commenting out ",Operator:=xlAnd" and remaining AutoFilter line
lets the code run without error and copies the 2005 data to a seperate
worksheet. The code is on a single line without a continuation "_"
character.
srcSh.Cells.AutoFilter Field:=13, Criteria1:="12/31/2004",
Operator:=xlAnd, Criteria2:="<=01/07/2005"
If I change the AutoFilter to the years 2003 & 2004 where I have more
data the filter is applied but no data is visible. All the data is
filtered out even though there is data for each month in the January -
June range. When you go into the filter the data is grouped by
month/year..."Jan-04", "Feb-04" and it will display if you manually
select it.
Thanks for helping with the code. The final solution is escaping me.
I'm hurting....What am I doing wrong?
Craigm
--
Craigm
------------------------------------------------------------------------
Craigm's Profile:
http://www.excelforum.com/member.php...o&userid=24381
View this thread:
http://www.excelforum.com/showthread...hreadid=387968