Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Nov 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to get all running Excel Instance (2000)

    Hello,

    I need to get all running Excel instance. I tried GetObject(, "Excel.Application") but it just return the first running instance. Is there any way that I can get the other instances.

    I appreciate your help,
    --Bita

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to get all running Excel Instance (2000)

    The attached code just returns the number of Excel instances (variable called iCount). You might change it to fit your need.

    <pre>Option Explicit
    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''
    ' Copyright
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to get all running Excel Instance (2000)

    Perhaps you can use/adapt the code from [VBnet System] How to Find Applications Matching a Specific Class or Window Title

    The class name of the Excel application windows is "XLMAIN".

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •