I have two worksheets open and I assume that the one with the VB code, has the property "ThisWorkbook"
I want to copy two sheets from one to the other, then I want to move the copied sheets to the end
Here is what I tried
There is an Error in step 3 "OBJECT Required"
Step 4 is incomplete, how do I define "The LAST sheet"?
-----------------------
Dim wb As Workbook
Dim wbTO, wbFROM As String
' 1 there are two workbook, "ThisWorkBook" has the VB code
For Each wb In Workbooks
If wb.Name = ThisWorkbook.Name Then wbFROM = wb.Name Else wbTO = wb.Name
Next wb
' 2 select the sheets on the FROM workbook
Workbooks(wbFROM).Activate
Sheets(Array("Order Info", "Customer Quote")).Select
' 3 Copy array of sheets to the "TO workbook" ------- ERROR - Object required
Sheets(Array("Order Info", "Customer Quote")).Copy Before:=Workbooks(wbTO.Sheets(1))
' 4 Now move the copied sheets to the end - LAST is to be determined
Sheets(Array("Order Info", "Customer Quote")).Move After:=Sheets(LAST)
I want to copy two sheets from one to the other, then I want to move the copied sheets to the end
Here is what I tried
There is an Error in step 3 "OBJECT Required"
Step 4 is incomplete, how do I define "The LAST sheet"?
-----------------------
Dim wb As Workbook
Dim wbTO, wbFROM As String
' 1 there are two workbook, "ThisWorkBook" has the VB code
For Each wb In Workbooks
If wb.Name = ThisWorkbook.Name Then wbFROM = wb.Name Else wbTO = wb.Name
Next wb
' 2 select the sheets on the FROM workbook
Workbooks(wbFROM).Activate
Sheets(Array("Order Info", "Customer Quote")).Select
' 3 Copy array of sheets to the "TO workbook" ------- ERROR - Object required
Sheets(Array("Order Info", "Customer Quote")).Copy Before:=Workbooks(wbTO.Sheets(1))
' 4 Now move the copied sheets to the end - LAST is to be determined
Sheets(Array("Order Info", "Customer Quote")).Move After:=Sheets(LAST)