I can copy ranges from one workbook to another by going back and forth between them. However, I'm getting the syntax wrong when I would like to cut down on the number of lines. See below:
THIS WORKS:
Dim wrk As Workbook
Dim ws As Worksheet
Set wrk = ActiveWorkbook
Worksheets("ALL Spec Pools").Select
Set ws = ActiveSheet
Set rRange2 = Range(Cells(12, 2), Cells(LastCellRow, 2))
rRange2.Copy
wrk.Activate
rRange2.Copy
Workbooks("Spec Pool Inventory.xlsm").Activate
Worksheets("INVENTORY").Select
Cells(LastCellRow + 1, 3).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
I have multiple ranges that I need to copy, thus I would think it would be easier to just reference the source workbook. As I've already named the ranges in the source workbook, I would like to use one line to do the copy. Something like:
wrk.ws.rRange2.Copy (**** THIS SYNTAX FAILS ****)
Cells(LastCellRow + 1, 3).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Thoughts???
THIS WORKS:
Dim wrk As Workbook
Dim ws As Worksheet
Set wrk = ActiveWorkbook
Worksheets("ALL Spec Pools").Select
Set ws = ActiveSheet
Set rRange2 = Range(Cells(12, 2), Cells(LastCellRow, 2))
rRange2.Copy
wrk.Activate
rRange2.Copy
Workbooks("Spec Pool Inventory.xlsm").Activate
Worksheets("INVENTORY").Select
Cells(LastCellRow + 1, 3).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
I have multiple ranges that I need to copy, thus I would think it would be easier to just reference the source workbook. As I've already named the ranges in the source workbook, I would like to use one line to do the copy. Something like:
wrk.ws.rRange2.Copy (**** THIS SYNTAX FAILS ****)
Cells(LastCellRow + 1, 3).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Thoughts???