Running code on workdays

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
 
B

Bob Phillips

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
 
C

Chip Pearson

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)
 

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


Top