Thread: Daily events
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Daily events

OnTime is a one time event. If you want it to recurr the macro set to run
Ontime must set it again.

Sub SetOnTime()
Application.OnTime SomeTime, "RunByOnTime"
End Sub

Sub RunByOnTime()
''Doing my Thing
Application.OnTime NextTime, "RunByOnTime"
End Sub

--
Jim
"BillM" wrote in message
...
|I am trying to copy DDE data froom one cell to another in a workbook on a
| daily basis. I used the Ontime function in an Auto_Open() sub. When I open
| the workbook, the Ontime function runs the first day and does in fact copy
| the data. It does not run on subsequent days unless I close the workbook
and
| reopen it. I may have the Ontime function in the wrong place or I may have
to
| do some additional programming to reschedule susequent Ontime Events. Does
| anyone out there have any ideas? Thanks!