mrmmickle1
Well-known Member
- Joined
- May 11, 2012
- Messages
- 2,461
Not sure how to go about this process. I was hoping that someone could point me in the right direction. I need to copy and array of cells in one workbook and paste that array into another array of cells in the second workbook.
Copy WorkBook is "Example"
Paste Workbook is "Work"
Not sure I am even on the right track. Any guidance with this issue would be great!!
Copy WorkBook is "Example"
Paste Workbook is "Work"
Code:
Sub CopyPasteBetweenWB()
Dim Finalrow As Long
Dim i As Integer
finalRow = ActiveSheet.UsedRange.Rows.count + 1
CopyArray = Array( "I4", "C28", "K22", "M23", "F27", "M22", "K23")
PasteArray = Array(2,3,4,5,6,7,8) [COLOR=#008000]'Final Row of Activesheet in "Work" Workbook in Respective Columns B, C, D, E, F ,G, H[/COLOR]
[COLOR=#008000]
[/COLOR] For i = LBound(CopyArray) To UBound(CopyArray)
[COLOR=#008000]
[/COLOR]Windows(Example).Activate[COLOR=#008000]
[/COLOR]CopyArray(i).Copy
Windows(Work).Activate
.Range(finalRow & PasteArray(i) ).PasteSpecial xlPasteValues
Next i
End Sub
Not sure I am even on the right track. Any guidance with this issue would be great!!