Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list open workbooks in multiple open excel applications

Status
Not open for further replies.

wbl

Programmer
Dec 29, 2003
9
NL
Hi,

I'am trying to get list of all open workbooks in multiple running excel applications in EXCEL VBA.

I'am trying a lot of solutions, but they only works with the active excel application.

Is there someone who can give me a fabulous solution ?
 
Hi wbl and welcome to Tek-Tips

May I suggest you read faq222-2244. You may then find that forum68 or forum707 may provide better answers for specifically VBA questions

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
You may be able to use EnumWindows and EnumChildWindows. Given you know the the class name of a workbook window, the workbook name will be part of its title text.

There's a free utility, WinSpy, on my website that shows the properties of open windows.
Paul Bent
Northwind IT Systems
 
Got to Forum707 for VBA programming issues:

This procedure will help you out though (in Excel VBA):
Code:
Sub ListOpenWorkbooks()
Dim msg As String, wb As Workbook
For Each wb In Application.Workbooks
    msg = msg & wb.Name & vbLf
Next wb
MsgBox msg, , "Open Workbooks"
End Sub



Peace!! [peace]

Mike

Didn't get the answers that you wanted? Take a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top