Threads?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to generate threads in Excell VB

I have a Workbook that has about a 1 minute recalculate cycle. During that time, the "Save" button on the dialog is seen depressed. I would like to display a dialog that says the sheet is recalculating, and leave it displayed while the recal is going on. In VC++, I would just a thread to display the dialog, but can't find in VB any procedure for doing this

Thanks

John H W
 
Hi John

As far as I know VB6 (the VBA language engine -or vice versa) doesn't do
multithreading. But perhaps someone proves me wrong or provide a workaround.

Best wishes Harald

John H W said:
Is there a way to generate threads in Excell VB?

I have a Workbook that has about a 1 minute recalculate cycle. During
that time, the "Save" button on the dialog is seen depressed. I would like
to display a dialog that says the sheet is recalculating, and leave it
displayed while the recal is going on. In VC++, I would just a thread to
display the dialog, but can't find in VB any procedure for doing this.
 
John,
Why not show the dialog first, then call you recalculation from the form's
activate event.
NickHK

John H W said:
Is there a way to generate threads in Excell VB?

I have a Workbook that has about a 1 minute recalculate cycle. During
that time, the "Save" button on the dialog is seen depressed. I would like
to display a dialog that says the sheet is recalculating, and leave it
displayed while the recal is going on. In VC++, I would just a thread to
display the dialog, but can't find in VB any procedure for doing this.
 
I wanted the message box to be displayed during the recalculation, or while the recalc is going on, then disappear when let the "original" or base thread destroy the msgbox thread (thereby closing it) when the recalc is done

Thanks anyway

John H W
 
Hi John,
Threads are not native to VB or VBA. There are way using API's.
See Randy Birch's example here http://vbnet.mvps.org/index.html?code/hooks/messageboxhooktimer.htm
This example is VB6 and requires the VB6 timer object which is NOT available in VBA.

If you can do without the timer object you should be able to modify the code to work fine in VBA.

--
John
johnf 202 at hotmail dot com


| Is there a way to generate threads in Excell VB?
|
| I have a Workbook that has about a 1 minute recalculate cycle. During that time, the "Save" button on the dialog is seen depressed. I would like to display a dialog that says the sheet is recalculating, and leave it displayed while the recal is going on. In VC++, I would just a thread to display the dialog, but can't find in VB any procedure for doing this.
|
| Thanks,
|
| John H W
 

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

Back
Top