I am copying data from one sheet to another one but runtime error 1004 occur it is due to active sheet problem. as code is for sheet 2 and 3 and during execution if I stay on sheet1 this error occurred. I need sheet1 also for work
use active sheet, select sheet but not solved
Sub T()
'Set wksSource = ActiveWorkbook.Sheets("Sheet3")
Sheets("sheet3").Range(Range("A1"), Range("A1").End(xlDown)).Copy
Sheets("sheet2").Cells(1, 1).PasteSpecial Paste:=xlPasteAll, Transpose:=True
End Sub
the code runs despite location of sheet