Can there be cross talk/interference between VBA worker threads launched using your multithreading with VBScript example? [Solved]

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.75 out of 5)
Loading...
Go back to All Questions Login or Register
Solved52 views
0

Hi Analystcave,

I am using your VBA multithreading with VBA worker threads code to launch multiple instances of a simulation program which relies on random numbers to generate traffic loadings.

I have found that I am getting a lot of duplicate maximum loadings from the individual worker VBA threads, which led me to think that I was getting duplicate random numbers.
I am now fairly sure this is not the case, so one of the other possibilities is that the threads are somehow getting values from each other. Since all the variables are identically named in the workbook copies launched via VBScript this seems like it could be possible to me, but I am not sure.

Do you know if it is possible for the individual instances of excel to interfere with each other?

Thanks in advance,
Darby

0

Hi Darby, the threads are separate instances of Excel (Excel.Application) so it is not probable they are communicating. Frankly I would simply add a code that each thread create its own txt dump file. Log all individual thread characteristics to check which threads are processing similar data. You can also use txt files to communicate between threads.

Simply the best place to learn VBA!

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match