How do I reference my primary workbook and the second workbook I open through this sub procedure? I attempt to do workbooks.(\"client_path\").activate
as my goal wi
dim Wb as workbook
set wb= Workbooks.Open (Client_path).activate
this opens, and activates it all in one line, an sets a variable for later use (wb).
note that refering later to wb will NOT open it again, and NOT activate it again, its just reference to the wb ! (unless you tell him to)
Can you just make references to your workbook earlier?
Dim wb as workbook
Dim wbDirty as workbook
set wb = thisWorkbook
set wbDirty = workbooks.open Client_Path
Then when you define the ranges, Excel knows which workbook they belong to.
Dim rngReconcile as range
Dim rngWatch as range
set rngReconcile = wb.Sheets(1).Range("K:K")
set rngWatch = wbDirty.Sheets("Client DIRTY watchlist").Range("B:B")
Then continue on with your looping code