VBA + Threads in MS Access [duplicate] VBA + Threads in MS Access [duplicate] multithreading multithreading

VBA + Threads in MS Access [duplicate]


You might want to check out this workaround: http://www.excelhero.com/blog/2010/05/multi-threaded-vba.html

It is Excel, but it should be practically the same. It works by building VBScript "agents" and have them execute tasks.. Check the example, it is quite impressive

-Viggo


There is no way to do this directly in VBA itself. Here is a MSDN forum discussion talking about this in detail. Office never exposed any of the VBA extensions for multithreading.

However, you can do this by calling out to the Windows API, or creating your own COM object in VBA (written elsewhere) which performs the multithreaded calls for you. Just make sure to marshall everything back to the calling thread, somehow (probably polling against your COM object, or something similar).

Also, you may want to check out bendewey's link on COM threading, since it's very relevant to this.


Good question, but i think it can't be done.