Subject: Excel macro application pause.
Posted By: hunchgun Post Date: 11/11/2005 10:11:20 PM
Can anyone tell me how can i pause or stop the application in the middle of my program for a few seconds and continue running back after that.

Sleep xxxx dont work because it still running the application.

i had tried many inbuild functions, but still can't find out ...

Pls help. thanks.

Reply By: quiksilverhg Reply Date: 11/12/2005 12:20:09 AM
You want it to pause while you're debugging or just stop it where it's at while it's running?

If you're debugging you can 'run to cursor'

If you want to stop it in the middle at least on mine you can just hit escape then it will give you the options "help", "debug", "continue"

Is that what you wanted?

Reply By: vemaju Reply Date: 11/12/2005 1:36:42 AM
Hi,

Use this code for waiting 5 seconds

Sub Wait()
' Waits 5 seconds
Application.Wait Time + TimeSerial(0, 0, 5)
' Continues here after pause
End Sub

-vemaju

Reply By: hunchgun Reply Date: 11/12/2005 12:58:55 PM
I want to stop in the middle of running.

Vemaju,
   Your subroutine almost help.
Let me explain more detail on it.

my sheet 1 is connected to FLUKE DAQ so the cell value is changing in real time. It will always trigger on that sheet.
What i want is running macro at the background, keep on polling the triggering cell and detect for change.
I am not familiar with macro, and i found out that once i run the macro, the sheet will stop triggering.

I am not sure macro can do kinda multithread thing, where the macro running at background and the cell value still triggering.

Hope you guys can help....
Thanks a lot.







Reply By: hunchgun Reply Date: 11/12/2005 1:46:18 PM
I think i can't do it. Do you guys have any other idea?

"The only thing you cannot do is work in the foreground on the same workbook which the macro is using."

http://exceltips.vitalnews.com/Pages/T0133_Working_While_a_Macro_is_Running.html



Go to topic 287

Return to index page 437
Return to index page 436
Return to index page 435
Return to index page 434
Return to index page 433
Return to index page 432
Return to index page 431
Return to index page 430
Return to index page 429
Return to index page 428