Running code on workdays

  • Thread starter Thread starter chrisnsmith
  • Start date Start date
C

chrisnsmith

What do I need to do to get this to execute only on workdays?

Sheets("Cus Futures").Select
Range(" H9:I50").Copy Range("D9:E50")
Range("F9:I50").ClearContents
'
Sheets("House Futures").Select
Range(" H9:I50").Copy Range("D9:E50")
Range("F9:I50").ClearContents
 
If Weekday(Date, vbMonday) < 6 Then

With Worksheets("Cus Futures")

.Range(" H9:I50").Copy .Range("D9:E50")
.Range("F9:I50").ClearContents
End With

With Worksheets("House Futures")

.Range(" H9:I50").Copy .Range("D9:E50")
.Range("F9:I50").ClearContents
End With
End If
 
If Weekday(Now, vbSaturday) >= 3 Then
' your code here
End If

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Back
Top