Please see the previous posts.
I couldnt get them to work but i did manae to modify the code to th
below and it works for one refresh at 20 minutes past but doesn
refresh after that. want it to keep refresh over and over i
possible?
Please can you help?
Option Explicit
Dim dNext As Date
Sub Aut

pen()
dNext = TimeSerial(Hour(Now) + IIf(Minute(Now) < 20, 0, 1), 20, 0)
Application.OnTime dNext, "refreshdata"
Workbooks(ActiveWorkbook.Name).RefreshAll
End Sub
Sub refreshdata()
dNext = TimeSerial(Hour(dNext) + 1, 20, 0)
Application.OnTime dNext, "refreshdata"
Workbooks(ActiveWorkbook.Name).RefreshAll
End Sub
Sub cancelTimer()
Application.OnTime dNext, "refreshdata", , False
End Su