Two workbooks: WBDestination and WBSource
Data needed starts at A3 in WBSource and goes down and to the right, variable distance
Need to clear out old data in WBDestination and replace it with new data from WBSource
Data in WBDestination needs to go starting in A10, down and to the right
I plan to trigger the code by right click to A7 in WBDestination
WBSource name consistently starts with "AB - CDEF" and then name may vary
Already have the code below to identify WBSource among open, just need the code for the rest:
Data needed starts at A3 in WBSource and goes down and to the right, variable distance
Need to clear out old data in WBDestination and replace it with new data from WBSource
Data in WBDestination needs to go starting in A10, down and to the right
I plan to trigger the code by right click to A7 in WBDestination
WBSource name consistently starts with "AB - CDEF" and then name may vary
Already have the code below to identify WBSource among open, just need the code for the rest:
VBA Code:
Sub ActivateWBbyName()
Dim iWorkbook As Workbook
For Each iWorkbook In Application.Workbooks
If iWorkbook.Name Like "AB - CDEF*" Then iWorkbook.Activate
‘code to do, call a macro
Next iWorkbook
End Sub