Greetings,
I would like to write a subroutine that operates while four different workbooks are open. The fourth workbook will change regularly but will need to work with other open workbooks. I have set different variables for the four workbook, but am stumped as to how to set the fourth. Ideally, if it was possible I would set wb4 to something like
but its not possible to write it like this. I suspect that defining a random name sheet with a single variable will be done using "not-equal to"
Any suggestions with the logic would be greatly appreciated.
Code:
Dim wb1 As WorkbookDim wb2 As Workbook
Dim wb3 As Workbook
Dim wb4 As Workbook
Set wb1 = General_Account_Ledger.xls
Set wb2 = PERSONAL.xls
Set wb3 = Products.xls
Set wb4 = wb1 Or wb2 Or wb3
I would like to write a subroutine that operates while four different workbooks are open. The fourth workbook will change regularly but will need to work with other open workbooks. I have set different variables for the four workbook, but am stumped as to how to set the fourth. Ideally, if it was possible I would set wb4 to something like
Code:
set wb4 <> wb1 Or wb2 or wb3
but its not possible to write it like this. I suspect that defining a random name sheet with a single variable will be done using "not-equal to"
Any suggestions with the logic would be greatly appreciated.