Multi-threaded calculation and VBA

J

jorma

I have an example with VBA and a simple sheet, which
- runs OK in Excel 2000
- runs OK in Excel 2007 when multi-threaded calculation is disabled
- fails in Excel 2007 when multi-threaded calculation is enabled on a
dual-core processor

It is really simple, it just changes some variables back and forth and
checks that the computed value from them is what it shoud be. There is a User
Form on the screen, and when I drag the form with my mouse during the
computation, the computation fails (in Excel 2007 on Vista with MTC and
dual-core).

The sheet is here:
http://www.mylvin.com/stuff/mtctest.zip
Open the sheet, click the button "Start MTC Stress Test",
click the button "Start the test" on the form which opens,
and then drag the form to a different position on the screen with your mouse.
You'll see the error message about the computation.
If you don't drag, the test runs fine.

I'm not sure if this is a bug in Excel 2007 (if so, I don't know where to
report it) or a wrong approach when programming with VBA into multi-threaded
enviroment.

What do you think?

- Jorma.
http://www.mylvin.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top