Results 1 to 5 of 5

Simulating multithreading in vba

Threaded View

  1. #1
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Simulating multithreading in vba

    Hello,

    I am working on making a project more efficient by breaking up the subs and putting each into it's own file so that each can run simultaneously (mimicking multithreading). First pass allowed me to create shared variables where the data in one variable (e.g. raw data stored in an array) can be shared among several workbooks (in the same instance of excel), but when I tried to create a parallel sequence, Excel refuses. It runs one file and waits for it to finish completely before moving to the nextfile.

    Does anyone know of any tricks to simulate multithreading? I have heard of using vbs, Application.ontime and Waitformultipleobjects API. Does anyone have any examples of any method?

    Right now I ended up having to start a new session of Excel and running each fie manually. What I would like to do is have one master and several slave files that can run in parallel.

    Thanks.

    abousetta
    Last edited by abousetta; 09-23-2012 at 08:02 AM.
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

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