Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA- Time delaying macro

Hi. I'm working on a macro that will take a row of cells (coming in fro
live feeds), copy the values, and paste them one row down. I want t
store 40 periods of data. I want to be able to enter the number o
seconds that the code delays before repeating this process. I wa
wondering if there is any time-delaying feature built into excel, an
how to program it so that it starts when i hit a button, and stops whe
i hit another button...

The copying part is easy enough to program, but the time thing is wha
is stumping me.

Thanks for help

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel VBA- Time delaying macro

You could look at incorporating an Ontime procedure driven by a button (look
in help).

Another way would be to use the windows timer. I have an example that you
can have if you email me. It has stop and start buttons.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"bsmith1 " wrote in message
...
Hi. I'm working on a macro that will take a row of cells (coming in from
live feeds), copy the values, and paste them one row down. I want to
store 40 periods of data. I want to be able to enter the number of
seconds that the code delays before repeating this process. I was
wondering if there is any time-delaying feature built into excel, and
how to program it so that it starts when i hit a button, and stops when
i hit another button...

The copying part is easy enough to program, but the time thing is what
is stumping me.

Thanks for help!


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA- Time delaying macro

This example pauses a running macro for approximately 10 seconds.

newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 10
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime

------------
That was copied directly from VBA help. Search for the 'wait' functio
to find out more.

-Gitcyphe

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA- Time delaying macro

Bob,

Could you tell me your email?


Bria

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel VBA- Time delaying macro

bob . phillips @ tiscali . co . uk

without the spaces

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"bsmith1 " wrote in message
...
Bob,

Could you tell me your email?


Brian


---
Message posted from http://www.ExcelForum.com/



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 dependant Excel Macro Dan Wood Excel Discussion (Misc queries) 1 January 12th 10 11:19 PM
Macro / function text time to 24hr excel time passed midnight fortotaling hr's Russmaz Excel Worksheet Functions 2 March 6th 09 04:58 AM
How do I get a macro in excel to look at different data each time zetty Excel Discussion (Misc queries) 3 February 7th 07 02:48 AM
excel - macro - automatic initiation of a macro at a pre-specified "system time" arunjoshi[_3_] Excel Programming 3 May 1st 04 09:42 AM
Delaying calculations Jerry Park Excel Programming 0 September 22nd 03 02:33 PM


All times are GMT +1. The time now is 08:25 AM.

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

About Us

"It's about Microsoft Excel"