Excel VBA- Time delaying macro

  • Thread starter Thread starter bsmith1
  • Start date Start date
B

bsmith1

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
 
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)
 
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Copy/Time Delay 6
Time Delay for Macros 4
time delay 3
Time Delay in VBA 3
.Font.ColorIndex Delay Question 3
Help with VBA 3
how to "delay" formula's calculations 5
delays in macros 2

Back
Top