A10hammond
New Member
- Joined
- May 8, 2019
- Messages
- 4
I am working to refresh morningstar data in an excel 2016 file, and I found the following code online on the Morningstar VBA guide:
The guide says that this will refresh the data at 10:01:00 AM everyday, what do I change do make this refresh at 9:00 AM everyday? Also, if it refreshes everything does the cell reference matter?
Thanks.
Code:
Public dTime As Date
Dim lNum As Long
Sub RunOnTime()
dTime = Sheet1.Cells(1, 1) 'change the cell reference here (Row #, Column #)
Application.OnTime dTime, "RunOnTime"
Set cmd = Application.CommandBars("Cell").Controls("Refresh All")
cmd.Execute
End Sub
The guide says that this will refresh the data at 10:01:00 AM everyday, what do I change do make this refresh at 9:00 AM everyday? Also, if it refreshes everything does the cell reference matter?
Thanks.