I have a master file which contains my macro to open Workbook 2.
Within Workbook 2, there is a sheet to copy from but it is not always the current sheet when the file is opened.
I need to activate this sheet, copy a certain range to the next empty row in my master file.
My code seems to copy the existing data in my master file not Workbook 2.
Here is my code:
Sub Get_TLS()
Application.ScreenUpdating = False
Filename = ActiveWorkbook.Name
Workbooks.OpenText Filename:= _
"THIS IS MY FILE PATH\*.xlsx"
Workbooks("Workbook2").Activate
Worksheets("SHEET TO COPY FROM").Activate
lastrow = ActiveSheet.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
Range("A3:GC" & lastrow).Copy
ThisWorkbook.Activate
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
ActiveSheet.Paste
End Sub