ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy/Time Delay (https://www.excelbanter.com/excel-programming/313974-copy-time-delay.html)

mike

Copy/Time Delay
 
Hi,

I'm trying to write a macro that would copy a large
amount of data (20,000 rows of data) however I need to do
100 rows every 1 second. Therefore I need some sort of
function that will have a time delay of 1 second within
the macro. (copy 100 rows wait one second, copy 100 rows
wait one sec etc)

Does anyone know of a function that will create a time
delay within a macro?


thanks in advance

Frank Stone

Copy/Time Delay
 
hi,
Application.Wait (Now + TimeValue("0:00:01"))
this vb code line will pause code excecution for 1 second
you will have to work it in somehow because i'm not
understanding the 1 second per 100 lines thing.
regards
Frank

-----Original Message-----
Hi,

I'm trying to write a macro that would copy a large
amount of data (20,000 rows of data) however I need to do
100 rows every 1 second. Therefore I need some sort of
function that will have a time delay of 1 second within
the macro. (copy 100 rows wait one second, copy 100 rows
wait one sec etc)

Does anyone know of a function that will create a time
delay within a macro?


thanks in advance
.


No Name

Copy/Time Delay
 
Frank,

Thank you very much. This works great!

One more question: Is there a way to have a 1.5 second
delay? I tried ("0:00:015) and it did not work.

thanks,

mike

-----Original Message-----
hi,
Application.Wait (Now + TimeValue("0:00:01"))
this vb code line will pause code excecution for 1 second
you will have to work it in somehow because i'm not
understanding the 1 second per 100 lines thing.
regards
Frank

-----Original Message-----
Hi,

I'm trying to write a macro that would copy a large
amount of data (20,000 rows of data) however I need to

do
100 rows every 1 second. Therefore I need some sort of
function that will have a time delay of 1 second within
the macro. (copy 100 rows wait one second, copy 100

rows
wait one sec etc)

Does anyone know of a function that will create a time
delay within a macro?


thanks in advance
.

.


Bob Phillips[_6_]

Copy/Time Delay
 
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Function ADelay(mSecs)
Sleep mSecs
End Sub


Adelay 1500

waits one and a half seconds


--

HTH

RP

wrote in message
...
Frank,

Thank you very much. This works great!

One more question: Is there a way to have a 1.5 second
delay? I tried ("0:00:015) and it did not work.

thanks,

mike

-----Original Message-----
hi,
Application.Wait (Now + TimeValue("0:00:01"))
this vb code line will pause code excecution for 1 second
you will have to work it in somehow because i'm not
understanding the 1 second per 100 lines thing.
regards
Frank

-----Original Message-----
Hi,

I'm trying to write a macro that would copy a large
amount of data (20,000 rows of data) however I need to

do
100 rows every 1 second. Therefore I need some sort of
function that will have a time delay of 1 second within
the macro. (copy 100 rows wait one second, copy 100

rows
wait one sec etc)

Does anyone know of a function that will create a time
delay within a macro?


thanks in advance
.

.




Tom Ogilvy

Copy/Time Delay
 
I don't think you can get a second and a half. I think you have to use
whole seconds.

--
Regards,
Tom Ogilvy


wrote in message
...
Frank,

Thank you very much. This works great!

One more question: Is there a way to have a 1.5 second
delay? I tried ("0:00:015) and it did not work.

thanks,

mike

-----Original Message-----
hi,
Application.Wait (Now + TimeValue("0:00:01"))
this vb code line will pause code excecution for 1 second
you will have to work it in somehow because i'm not
understanding the 1 second per 100 lines thing.
regards
Frank

-----Original Message-----
Hi,

I'm trying to write a macro that would copy a large
amount of data (20,000 rows of data) however I need to

do
100 rows every 1 second. Therefore I need some sort of
function that will have a time delay of 1 second within
the macro. (copy 100 rows wait one second, copy 100

rows
wait one sec etc)

Does anyone know of a function that will create a time
delay within a macro?


thanks in advance
.

.




No Name

Copy/Time Delay
 
thank you!

-----Original Message-----
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds

As Long)

Function ADelay(mSecs)
Sleep mSecs
End Sub


Adelay 1500

waits one and a half seconds


--

HTH

RP

wrote in message
...
Frank,

Thank you very much. This works great!

One more question: Is there a way to have a 1.5 second
delay? I tried ("0:00:015) and it did not work.

thanks,

mike

-----Original Message-----
hi,
Application.Wait (Now + TimeValue("0:00:01"))
this vb code line will pause code excecution for 1

second
you will have to work it in somehow because i'm not
understanding the 1 second per 100 lines thing.
regards
Frank

-----Original Message-----
Hi,

I'm trying to write a macro that would copy a large
amount of data (20,000 rows of data) however I need

to
do
100 rows every 1 second. Therefore I need some sort

of
function that will have a time delay of 1 second

within
the macro. (copy 100 rows wait one second, copy 100

rows
wait one sec etc)

Does anyone know of a function that will create a

time
delay within a macro?


thanks in advance
.

.



.


Tom Ogilvy

Copy/Time Delay
 
.. . . Using the built in Wait function

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
I don't think you can get a second and a half. I think you have to use
whole seconds.

--
Regards,
Tom Ogilvy


wrote in message
...
Frank,

Thank you very much. This works great!

One more question: Is there a way to have a 1.5 second
delay? I tried ("0:00:015) and it did not work.

thanks,

mike

-----Original Message-----
hi,
Application.Wait (Now + TimeValue("0:00:01"))
this vb code line will pause code excecution for 1 second
you will have to work it in somehow because i'm not
understanding the 1 second per 100 lines thing.
regards
Frank

-----Original Message-----
Hi,

I'm trying to write a macro that would copy a large
amount of data (20,000 rows of data) however I need to

do
100 rows every 1 second. Therefore I need some sort of
function that will have a time delay of 1 second within
the macro. (copy 100 rows wait one second, copy 100

rows
wait one sec etc)

Does anyone know of a function that will create a time
delay within a macro?


thanks in advance
.

.







All times are GMT +1. The time now is 12:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com