How to trigger a macro at regular intervals?

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
Back
Top