We are moving from Excel 2003 to 2007 and we have a report that reads from another spreadsheet. It still runs fine in 03 but in 07 we get the following error
Run-Time Error '1004' The information cannot be pasted because the Copy area and the paste are are not the same size and shape.
Enclosed is the code.
Dim AICount As Integer
Selection.AutoFilter
Selection.AutoFilter Field:=12, Criteria1:="AISCN"
Application.Columns("L:L").Select
Selection.Copy
Windows("AutoProdRpt.xls").Activate
Sheets("AISCN").Select
Application.Range("A1").Select
ActiveSheet.Paste
Application.Range("C2").Select
Application.CutCopyMode = False
Application.Range("C1").Value = "=COUNTA(A:A) - 1"
Windows(Right(strFileName, 12)).Activate
Selection.AutoFilter
Application.Range("A1").Select
Windows("AutoProdRpt.xls").Activate
End Sub
It has a yellow highlight over the ActiveSheet.Paste
Any assistance will be appreciated. Thank you.
Run-Time Error '1004' The information cannot be pasted because the Copy area and the paste are are not the same size and shape.
Enclosed is the code.
Dim AICount As Integer
Selection.AutoFilter
Selection.AutoFilter Field:=12, Criteria1:="AISCN"
Application.Columns("L:L").Select
Selection.Copy
Windows("AutoProdRpt.xls").Activate
Sheets("AISCN").Select
Application.Range("A1").Select
ActiveSheet.Paste
Application.Range("C2").Select
Application.CutCopyMode = False
Application.Range("C1").Value = "=COUNTA(A:A) - 1"
Windows(Right(strFileName, 12)).Activate
Selection.AutoFilter
Application.Range("A1").Select
Windows("AutoProdRpt.xls").Activate
End Sub
It has a yellow highlight over the ActiveSheet.Paste
Any assistance will be appreciated. Thank you.