Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Additional thread in VB in Excel
Hi
I have a VB-code in excel, witch calls a shell function that starts an .exe file. The exe file launches in a separate DOS-window, and does a lot of calculation, before it finally dies, and the message "Done. Press any key to Terminate" appears on the bottom of the DOS- window. (Witch is actually a lie, because you have to close the window manually to make it disappear) The DOS- window uses approximately 3 hours to finish, and during that time, the rest of the VB-program is in a while loop, checking if the DOS-window is still active. When all the calculations are done, the program reads the results from a file stored on disk. My problem is that during the calculation, the program seems to "hang". It's in a while loop, just waiting for the DOS-window to close. I need to be able to use the rest of the program while the DOS-calculation is active, and when the calculations are done, it should automatically get the results and visualize them. I have figured out two possible ways to solve this. The best would be if I could start a paralell thread that checked every minute if the calculations are done. When they are done, it visualizes them, before the thread dies. The other way is a lot less attractive, but might be the only way. I need to be able to close the DOS-window completely when the calculations are done, not just ending the program that is calculating, but also closing it's window, and then send a message to the user "Calculation complete". It would be a lot better than it is now, but not as good at the first one. The calculation program is coded in C++, and I can edit that code too, if necessary. Thanks for all answers/help/new ideas! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multi thread in Excel | Excel Worksheet Functions | |||
Shared Wb-Thread 2 | Excel Discussion (Misc queries) | |||
Yet another Look up thread... | Excel Discussion (Misc queries) | |||
Excel is multi thread program? | Excel Discussion (Misc queries) | |||
Excel macros should be able to record pauses, thread.sleep(23489) | Excel Discussion (Misc queries) |