Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code that Exits on certain Dates
I have some code that executes when a file is opened. What code could
I introduce that would exit if Today()= 15/12/08 or 16/12/08 or 17/12/08? An ideal extension of the above would be on 15/12 or 16/12 or 17/12 in any year (just so that I can future proof my code) Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code that Exits on certain Dates
In the ThisWorkbook code module, use code like
Private Sub Workbook_Open() If (Month(Now) = 12) And _ (Day(Now) = 15) And (Day(Now) <= 17) Then Exit Sub End If ''''''''''''' ' code to run other days goes here ''''''''''''' End Sub Cordially, Chip Pearson Microsoft MVP Excel Product Group Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Sun, 14 Dec 2008 11:31:50 -0800 (PST), Seanie wrote: I have some code that executes when a file is opened. What code could I introduce that would exit if Today()= 15/12/08 or 16/12/08 or 17/12/08? An ideal extension of the above would be on 15/12 or 16/12 or 17/12 in any year (just so that I can future proof my code) Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code that Exits on certain Dates
Thanks Chip
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find if value exits in array | Excel Worksheet Functions | |||
Spacebar Exits Macro | Excel Programming | |||
Sub Exits Unexpectedly | Excel Programming | |||
way to run sub after user exits textbox | Excel Programming | |||
graceful exits | Excel Programming |