View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rich_z[_14_] Rich_z[_14_] is offline
external usenet poster
 
Posts: 1
Default REPEAT SOME ACTION IN MACRO


Code:
--------------------

Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:00:05"), "OnTimer"
End Sub

Sub OnTimer
dim ST as Date, NT as date
Application.ScreenUpdating = false
'*
'* Your code here
'*
DoEvents
'*
'* Reschedule the interrupt
'*
Application.OnTime Now + TimeValue("00:00:05"), "OnTimer"
Application.ScreenUpdating = True
End Sub

--------------------


Regards

Rich


--
Rich_z
------------------------------------------------------------------------
Rich_z's Profile: http://www.excelforum.com/member.php...o&userid=24737
View this thread: http://www.excelforum.com/showthread...hreadid=384269