C
Craigm
The code below runs sometimes then it crashes other times with a "Past
Method of Worksheet Class Failed". The Debugger stops on th
"ActiveSheet.Paste" line.
It always copies and pastes the correct filtered data. It may hav
something to do with the filter being on or off before the routine i
run??? Thats a guess.
I've tried to fix this so may ways I can't think anymore.
Any ideas? Thanks!
----------------------------------------
ActiveWindow.Visible = False
Windows("060631 Charts_DataDown.xls").Activate
Sheets("Datadown").Select
Rows("7:7").Select
Range("J7").Activate
Selection.AutoFilter
ActiveWindow.LargeScroll ToRight:=1
Selection.AutoFilter Field:=13, Criteria1:=">12/31/2004"
Operator:=xlAnd _
, Criteria2:="<1/1/2006"
Cells.Select
Selection.Copy
Sheets("2005").Select
Worksheets("2005").Activate
ActiveSheet.Paste Destination:=Worksheets("2005").Range("A1")
Method of Worksheet Class Failed". The Debugger stops on th
"ActiveSheet.Paste" line.
It always copies and pastes the correct filtered data. It may hav
something to do with the filter being on or off before the routine i
run??? Thats a guess.
I've tried to fix this so may ways I can't think anymore.
Any ideas? Thanks!
----------------------------------------
ActiveWindow.Visible = False
Windows("060631 Charts_DataDown.xls").Activate
Sheets("Datadown").Select
Rows("7:7").Select
Range("J7").Activate
Selection.AutoFilter
ActiveWindow.LargeScroll ToRight:=1
Selection.AutoFilter Field:=13, Criteria1:=">12/31/2004"
Operator:=xlAnd _
, Criteria2:="<1/1/2006"
Cells.Select
Selection.Copy
Sheets("2005").Select
Worksheets("2005").Activate
ActiveSheet.Paste Destination:=Worksheets("2005").Range("A1")