×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

VBA Excel - Get Filename of every Excel SS across multiple instances

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

 
Replies continue below

Recommended for you

RE: VBA Excel - Get Filename of every Excel SS across multiple instances

You might post this over at Tek-tips.com - a sister to this website.  Those guys are real programming geeks and know some stuff.

RE: VBA Excel - Get Filename of every Excel SS across multiple instances

This will get all the workbook names in the current excel:
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)'  ?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close