Stretchwickster
Programmer
Can anyone spot a problem with this code:
I'm getting an error on the last line: "Paste method of Worksheet class failed"
Anyone got any ideas?
Clive![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
Ex nihilo, nihil fit (Out of nothing, nothing comes)
Code:
Workbooks.Open (AFilename)
ActiveWorkbook.Worksheets(1).Range("A1:E513").Select
Selection.Copy
ThisWorkbook.Activate
Worksheets("DataSheet").Range("A1:K1").NumberFormat = "@"
Worksheets("DataSheet").Range(ACellReference).Activate
ActiveSheet.Paste
I'm getting an error on the last line: "Paste method of Worksheet class failed"
Anyone got any ideas?
Clive
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
Ex nihilo, nihil fit (Out of nothing, nothing comes)