View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Andyjim Andyjim is offline
external usenet poster
 
Posts: 70
Default Schedule downloads in VBA


Thanks Jim,
The following is working:
*********
Sub Workbook_OnOpen()

Call Scheduler

End Sub
*********
Sub Scheduler()
Dim TheTime
TheTime = Time

'IF day(now) = Friday And Hour(now) = 5Pm then
If TheTime = #5:00:00 PM# Then
Application.Quit
Else
GetQuotes 'Call GetQuotes macro
Application.OnTime Now + TimeSerial(0, 10, 0), "Scheduler" 'Wait 10m
End If
End Sub
**********

But I don't know how to get Friday into the mix. Good idea, to Save after
each download. I'll do that.

Andy