my code has workbook A and workbook B. I copy sheets from B to A. The issue is that both will be open, so I explicitly name each workbook.
When I paste into B I activate A by its name. Is there anyway I can activate A without using the workbook name?
'Set Current Workbook as Master
Set masterWB = Application.ThisWorkbook
'Set some Workbook as the one you are copying from
Set dailyWB = Workbooks.Open(Sheets("Control Manager").Range("O2"))
'Copy the Range from dailyWB and Paste it into the MasterWB
dailyWB.Sheets("Summary").Range("A1:BJ200").Copy masterWB.Sheets("AFS Summary").Range("A1").Rows("1:1")
'formatting and paste as values
Workbooks("Workbook B").Activate
Worksheets("Summary").Select