Hello All,
I'm trying to copy dynamic range without copy-paste sequence, where the position of last column is dynamic. To test the correctness of my code, I'm using fixed ranges now and this code works well:
Sheets("Data").Range("A1:J1").Value = Sheets("ExportTemplate").Range("A1:J1").Value
while the next code returns runtime error 1004: Application-definded or object-defined error:
Sheets("Data").Range(Cells(1, 1), Cells(1, 10)).Value = Sheets("ExportTemplate").Range(Cells(1, 1), Cells(1, 10)).Value
I'm not showing declarations to simplify te query.
Could you please let me know what I'm doing wrongly?
Thank you in advance!
I'm trying to copy dynamic range without copy-paste sequence, where the position of last column is dynamic. To test the correctness of my code, I'm using fixed ranges now and this code works well:
Sheets("Data").Range("A1:J1").Value = Sheets("ExportTemplate").Range("A1:J1").Value
while the next code returns runtime error 1004: Application-definded or object-defined error:
Sheets("Data").Range(Cells(1, 1), Cells(1, 10)).Value = Sheets("ExportTemplate").Range(Cells(1, 1), Cells(1, 10)).Value
I'm not showing declarations to simplify te query.
Could you please let me know what I'm doing wrongly?
Thank you in advance!