gtd526
Well-known Member
- Joined
- Jul 30, 2013
- Messages
- 657
- Office Version
- 2019
- Platform
- Windows
Hello,
I want to run a Private Sub on Thursday on or after 10:45am, listed under "This Workbook" under Excel Objects.
I use code:
Private Sub Workbook_Open2()
'test for time to perform
If Weekday(Now()) = vbThursday Then
Application.OnTime TimeValue("10:45:00"), "Query_Update" 'going to Query_Update to perform
End If
End Sub
"Query_Update" will update all Queries in the Workbook:
Workbooks("NFL.xlsm").RefreshAll
Im trying to run "Query_Update", listed under Modules as a separate sub.
Its not performing the "Query_Update" as listed.
Thank you.
I want to run a Private Sub on Thursday on or after 10:45am, listed under "This Workbook" under Excel Objects.
I use code:
Private Sub Workbook_Open2()
'test for time to perform
If Weekday(Now()) = vbThursday Then
Application.OnTime TimeValue("10:45:00"), "Query_Update" 'going to Query_Update to perform
End If
End Sub
"Query_Update" will update all Queries in the Workbook:
Workbooks("NFL.xlsm").RefreshAll
Im trying to run "Query_Update", listed under Modules as a separate sub.
Its not performing the "Query_Update" as listed.
Thank you.