I'd like to get the data of A and B columns inside .xlsx
file, and paste them in the active Workbook
, in both BS
and BT
columns, starting at row 6.
This is the code I've been using in other parts of the macro:
Workbooks.Open ThisWorkbook.Path & "\..\macro\options.xlsx"
Workbooks("options.xlsx").Activate
Set c = .Find("licensePlate", LookIn:=xlValues)
Range(c.Offset(1, 0), Range(c.Address).End(xlDown)).Copy
ThisWorkbook.Activate
Sheets("example").Activate
Range("BS6").PasteSpecial Paste:=xlPasteValues
Workbooks("options.xlsx").Activate
Set c = .Find("description", LookIn:=xlValues)
Range(c.Offset(1, 0), Range(c.Address).End(xlDown)).Copy
ThisWorkbook.Activate
Sheets("example").Activate
Range("BT6").PasteSpecial Paste:=xlPasteValues
Workbooks("options.xlsx").Close
ThisWorkbook.Activate
It worked in all of the macro content except on this portion of code. It fails at line 5, which is:
(Range(c.Offset(1, 0), Range(c.Address).End(xlDown)).Copy)