Time Marcos on Weekday only

P

Per Jessen

Hi

Use the code below to determine if the weekday fall into your criteria and
then use the OnTime statement:

Dim MyWeekDay As Long
MyWeekDay = Weekday(Date, FirstDayOfWeek:=vbMonday)
Select Case MyWeekDay
Case 1 To 5
'Monday to Friday
Application.OnTime TimeValue("08:00:00"), "MyMacro"
End Select

Hopes this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Time Macro Issue 3
Date Marco 2
Is weekday? 2
International/Date issue 5
Time Marco issue 2
Run Time macro based on the value in cell 4
VBA call xlfit 1
Extract Formula to Text 6

Top