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

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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
.

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
.

.



  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default 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
.

.



.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
.

.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
.

.





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
time delay refresh on random number Bertrand[_2_] Excel Worksheet Functions 2 January 27th 10 01:00 AM
Time delay in displaying charts & chart names hjs40 Charts and Charting in Excel 2 October 21st 07 08:55 PM
Time Delay for Macros [email protected] Excel Discussion (Misc queries) 1 May 15th 07 02:42 PM
Copy/Paste in Excel Delay Ray2943 Links and Linking in Excel 1 December 7th 06 12:54 AM
Time Delay Kilcup[_9_] Excel Programming 3 July 2nd 04 03:39 PM


All times are GMT +1. The time now is 08:16 PM.

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"