How to trigger a macro at regular intervals?

G

Guest

I have a workbook that is being updated through DDE links. I also want to
trigger the recalculation of a cell at regular intervals (every 5 seconds,
for example) while the DDE updates are happening. How can I do this? I tried
the Wait function in a macro, but this interrupts all updates. Any other
ideas?
 
G

Guest

You can give this a try. Place this in a standard code module...

Sub RefreshStuff()
MsgBox "Tada"
Application.OnTime Now + TimeValue("00:00:05"), "ReCalculate"

End Sub

sub ReCalculate()
application.calculate 'or calculatefull
end sub
 

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

Top