Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi thread in Excel Radhakrishna k.v.n.r[_2_] Excel Worksheet Functions 3 October 29th 07 05:07 AM
Shared Wb-Thread 2 Jim May Excel Discussion (Misc queries) 0 September 2nd 06 04:24 PM
Yet another Look up thread... mbachurski Excel Discussion (Misc queries) 3 January 26th 06 10:33 PM
Excel is multi thread program? maplemaple Excel Discussion (Misc queries) 0 January 13th 06 10:43 PM
Excel macros should be able to record pauses, thread.sleep(23489) rcjcooke Excel Discussion (Misc queries) 0 June 24th 05 03:00 PM


All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"