+ Reply to Thread
Results 1 to 3 of 3

Multiple Excel Instances

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Pleasanton, CA
    MS-Off Ver
    Excel 2016
    Posts
    23

    Multiple Excel Instances

    To get around the lack of multi-threading in Excel, I am using multiple instances of Excel Applications. One instance is controlling the other instances via VBA but I would like to be able to check if an instance is done running a macro. I have read that the Application.Ready method is not all that reliable and from what I can tell, it returns true even though the instance is running a macro.

    Is there something else I can use to determine if an Excel instance is busy running a macro?

    If I attempt to run a macro on an instance that is already busy running a macro using application.run method, it seems to just ignore the call and skip over it. I would like the main instance to wait until one of the instances becomes idle before continuing.


    Thanks
    Last edited by markinpt; 01-31-2013 at 02:12 PM.

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Multiple Excel Instances

    I have created/used something similar where I would use one dedicated worksheet for communication between the instances. If a job was running in a child/batch job it for example would set a value in cell A1 which I could read from the parent workbook, and I have also used a concept where I would have a 'communication worksheet' in the parent workbook and each child workbook would maintain its status on a different row of the parent workbook. Using the latter concept I could easily control up to 10 Excel child instances running in parallel. I used VBScripting for the child processes which would open an instance of Excel.
    If you like my contribution click the star icon!

  3. #3
    Registered User
    Join Date
    01-30-2013
    Location
    Pleasanton, CA
    MS-Off Ver
    Excel 2016
    Posts
    23

    Re: Multiple Excel Instances

    Thanks, that's kind of what I am doing now but I just thought I might be missing a property somewhere which would tell me if the macro was running in an instance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1