I have this code at the start of my VBA.
Sub Starting_Workbook()
Dim x As Workbook, y As Workbook
Set x = Workbooks(1)
Set y = Workbooks(2)
End Sub
I have a macro workbook looking at two open workbooks where the workbook name is always variable.
On one of the workbooks cell E1 always has the text "Wage Code".
Depending on the order the user opens the workbooks or which one is active when the macro is executed I cant guarantee I will get the result I expect.
If some extra code can be added so the workbook which contains "Wage Code" in E1 is always set as variable y that would solve my problem.
Any help would be appreciated.
Thank you
Bookmarks