Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Instead of debugging, code just stops running | Excel Discussion (Misc queries) | |||
VB code for running a macro | Excel Discussion (Misc queries) | |||
Please Help Error 400 when running tested code | Excel Discussion (Misc queries) | |||
Automatically running code | Excel Worksheet Functions | |||
running code | New Users to Excel |