Guys,
Basically I'm wanting to have 3 macros automatically fired at set times each morning (Workbook is already open at these times). However, if it's a Friday, I need an additional Macro to be fired, followed by the remaining daily ones. I need to know if my code is likely to be correct, but can't wait until Friday
Private Sub Workbook_Open()
'
Worksheets("HOME").Activate
'
If Weekday(Date) = 5 Then
Application.OnTime TimeValue("01:50:00"), "WeekClose"
Else
Application.OnTime TimeValue("02:00:00"), "IMPORT_Overview"
Application.OnTime TimeValue("02:30:00"), "Email_Import"
Application.OnTime TimeValue("03:00:00"), "Export_Top_Level"
End If
'
End Sub
Thanks for any reassurance.
Shaun.
Basically I'm wanting to have 3 macros automatically fired at set times each morning (Workbook is already open at these times). However, if it's a Friday, I need an additional Macro to be fired, followed by the remaining daily ones. I need to know if my code is likely to be correct, but can't wait until Friday
Private Sub Workbook_Open()
'
Worksheets("HOME").Activate
'
If Weekday(Date) = 5 Then
Application.OnTime TimeValue("01:50:00"), "WeekClose"
Else
Application.OnTime TimeValue("02:00:00"), "IMPORT_Overview"
Application.OnTime TimeValue("02:30:00"), "Email_Import"
Application.OnTime TimeValue("03:00:00"), "Export_Top_Level"
End If
'
End Sub
Thanks for any reassurance.
Shaun.