+ Reply to Thread
Results 1 to 3 of 3

Running Multiple Excel VBA instances

  1. #1
    Registered User
    Join Date
    10-17-2008
    Location
    UK
    Posts
    17

    Running Multiple Excel VBA instances

    Hi,

    I have not managed to come up with a solution either myself or by searching. i could very well be asking the wrong questions, of course.

    i have a spread sheet which has a very complex simulaton in it. excel is not the ideal place for it, but it is not possible to port it wholesale to something more sensible. i have modified the code so that it is possible to run two copies of the spread sheet (in two seperate excel processes) at one time. Due to the dual core nature of the machine this has almost no overhead.

    I have created a controlling spread sheet that is cabable of launching multiple copies of the simulation and starting the code executing. the problem is the controlling spread sheet always waits for the code to return before it continues, hence it would open two seperate versions of excel, start the first simulation executing and then wait until it completes before starting the next one. is there any way of starting a function in another work book without waiting for the execution to complete?

    i hope this makes sense, if you need any further information, please let me know what would be useful.

    just to clarify: i can launch two seperate excel processes from my initial vba code, i can also call a function in the launched code, but i can't start it without having to wait for it to complete execution. i tried adding code to the on open command, so that the code would execute as soon as the spread sheet was opened, however the 'open' event did not finish and return exectution to the calling sheet until the simulation had completed.

    regards
    Last edited by mynci; 04-28-2009 at 11:30 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: Running Multiple Excel VBA instances

    could you make use of the Ontime command
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    10-17-2008
    Location
    UK
    Posts
    17

    Re: Running Multiple Excel VBA instances

    That works perfectly!

    Thanks Andy - never new that existed.

    Many Thanks

+ 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