Daily events

B

BillM

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!
 
J

Jim Rech

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
|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!
 

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