![]() |
Running code on workdays
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 |
Running code on workdays
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 -- __________________________________ HTH Bob "chrisnsmith" wrote in message ... 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 |
Running code on workdays
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) On Wed, 4 Feb 2009 09:53:01 -0800, chrisnsmith wrote: 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 |
All times are GMT +1. The time now is 04:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com