Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
As the title states, is possible to "list" all open workbooks but not include the current workbook.
After searching the web this is closest the following code is pretty close to what I am looking for, except it list each individual open workbook in a msgbox one at time. Which makes sense since the msgbox is within a For Loop but unfortunately it also includes the current workbook as well.
Thank you
After searching the web this is closest the following code is pretty close to what I am looking for, except it list each individual open workbook in a msgbox one at time. Which makes sense since the msgbox is within a For Loop but unfortunately it also includes the current workbook as well.
Thank you
Code:
Sub isAnyWorkbookOpen()
Dim wb As Workbook
Dim wbs As Workbooks
Set wbs = Application.Workbooks
For Each wb In wbs
MsgBox wb.Name
Next wb
End Sub