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

Top