Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Wait time before next command

I am trying to run a macro that sends information to a non-microsoft
application. I want to run several lines of code, then pause for a couple of
seconds to allow the application to process, then continue again with the
code. How can I keep excel from sending information for a couple of seconds
to let processing of my request happen, and then send new information.

Thanks for the help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Wait time before next command

Look at the wait command

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I am trying to run a macro that sends information to a non-microsoft
application. I want to run several lines of code, then pause for a couple

of
seconds to allow the application to process, then continue again with the
code. How can I keep excel from sending information for a couple of

seconds
to let processing of my request happen, and then send new information.

Thanks for the help!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Wait time before next command

If I use this command and then again later in the code it freezes excel for
20 seconds and then sends all the info to my other application. Shouldn't
this command send the code, then wait 10 secs, send more code, then wait 10
secs again...

Code
Application.Wait Now + TimeSerial(0, 0, 10)
More Code
Application.Wait Now + TimeSerial(0, 0, 10)

This seems to be trying to pause the application, not excel from sending the
commands.

do i need to use something else?

"Tom Ogilvy" wrote:

Look at the wait command

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I am trying to run a macro that sends information to a non-microsoft
application. I want to run several lines of code, then pause for a couple

of
seconds to allow the application to process, then continue again with the
code. How can I keep excel from sending information for a couple of

seconds
to let processing of my request happen, and then send new information.

Thanks for the help!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Wait time before next command

throw in a doevents before calling Wait each time.

--
Regards,
Tom Ogilvy

"John" wrote in message
...
If I use this command and then again later in the code it freezes excel

for
20 seconds and then sends all the info to my other application. Shouldn't
this command send the code, then wait 10 secs, send more code, then wait

10
secs again...

Code
Application.Wait Now + TimeSerial(0, 0, 10)
More Code
Application.Wait Now + TimeSerial(0, 0, 10)

This seems to be trying to pause the application, not excel from sending

the
commands.

do i need to use something else?

"Tom Ogilvy" wrote:

Look at the wait command

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I am trying to run a macro that sends information to a non-microsoft
application. I want to run several lines of code, then pause for a

couple
of
seconds to allow the application to process, then continue again with

the
code. How can I keep excel from sending information for a couple of

seconds
to let processing of my request happen, and then send new information.

Thanks for the help!






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Wait time before next command

Thanks, I got it working... I am 90% sure it was an application error that
was causing my first command not to work.

"Tom Ogilvy" wrote:

throw in a doevents before calling Wait each time.

--
Regards,
Tom Ogilvy

"John" wrote in message
...
If I use this command and then again later in the code it freezes excel

for
20 seconds and then sends all the info to my other application. Shouldn't
this command send the code, then wait 10 secs, send more code, then wait

10
secs again...

Code
Application.Wait Now + TimeSerial(0, 0, 10)
More Code
Application.Wait Now + TimeSerial(0, 0, 10)

This seems to be trying to pause the application, not excel from sending

the
commands.

do i need to use something else?

"Tom Ogilvy" wrote:

Look at the wait command

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I am trying to run a macro that sends information to a non-microsoft
application. I want to run several lines of code, then pause for a

couple
of
seconds to allow the application to process, then continue again with

the
code. How can I keep excel from sending information for a couple of
seconds
to let processing of my request happen, and then send new information.

Thanks for the help!






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
sendkeys(keys,wait) how do I use wait MM Excel Discussion (Misc queries) 1 February 11th 09 03:47 PM
How to use time with an If command? [email protected] Excel Worksheet Functions 1 February 18th 08 11:05 PM
Macro Wait command Donkin[_3_] Excel Programming 2 June 2nd 05 10:45 PM
Macro Wait command fastmonkey512 Excel Programming 0 June 2nd 05 04:12 PM
How can you wait for the SHELL command to terminate ? Dave Peterson[_3_] Excel Programming 1 October 1st 03 09:10 AM


All times are GMT +1. The time now is 01:13 AM.

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

About Us

"It's about Microsoft Excel"