VBA Excel - Get Filename of every Excel SS across multiple instances
VBA Excel - Get Filename of every Excel SS across multiple instances
(OP)
I need to get the filenames of all currently open workbooks in all instances of Excel. As well as change the focus to any open workbook in any of those instances.
I have tried almost everything and searched everywhere, but still have no solution.
For Each process In GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_process ")
If process.Name = "EXCEL.EXE" Then
activateapp(process)
This is about the closest I could find.
Any help would be great.
Thanks
I have tried almost everything and searched everywhere, but still have no solution.
For Each process In GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf("Win32_process ")
If process.Name = "EXCEL.EXE" Then
activateapp(process)
This is about the closest I could find.
Any help would be great.
Thanks
RE: VBA Excel - Get Filename of every Excel SS across multiple instances
RE: VBA Excel - Get Filename of every Excel SS across multiple instances
Sub getwbs()
Dim mywb As Workbook
For Each mywb In Workbooks
Debug.Print mywb.Name
Next mywb
End Sub
I agree Tek-tips is a good bet.
=====================================
(2B)+(2B)' ?