Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi dear friends,
its an simple question for you.... i want to repeat some action in my excel workbook at every 5 minuts.. by the help of VB just like Private Sub Workbook_Open() Application.ScreenUpdating = false dim ST, NT as date ST = timer nt = st + TimeValue("00:05:00") loop if nt = timer then call XXX end if do events end loop End Sub can anyone help me?? thanks in advance suresh tp |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to read more about Excel's VBA OnTime method, visit Chip Pearson's
site: http://www.cpearson.com/excel/ontime.htm SURESH wrote: Hi dear friends, its an simple question for you.... i want to repeat some action in my excel workbook at every 5 minuts.. by the help of VB just like Private Sub Workbook_Open() Application.ScreenUpdating = false dim ST, NT as date ST = timer nt = st + TimeValue("00:05:00") loop if nt = timer then call XXX end if do events end loop End Sub can anyone help me?? thanks in advance suresh tp -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to action formula | New Users to Excel | |||
Excell copy action pauses for 15 second for the smallest action | Excel Discussion (Misc queries) | |||
Repeat last action | Excel Worksheet Functions | |||
on particular action run a macro | Excel Discussion (Misc queries) | |||
repeat an action in different locations | Excel Worksheet Functions |