Ironman
Well-known Member
- Joined
- Jan 31, 2004
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
Hi
The below code, currently commented out in the Workbook_Open event, counts down (i.e. the number of days remaining reduces in each daily msgbox) until Jan 1 to remind me to update some code.
[The named range "VBADaysLeft" is DATE(YEAR(TODAY()),12,31)-LOOKUP(10^35,A:A) and works perfectly OK]
The problem is, it's commented out because I don't want the above to start running until 25 December each year but I will need reminding the week before the new year each year.
Can this be automated so I start receiving the daily reminder when I open the workbook between 25 December and 1 January, and not just on 25 December? (else I would simply insert the below line)
Thanks!
The below code, currently commented out in the Workbook_Open event, counts down (i.e. the number of days remaining reduces in each daily msgbox) until Jan 1 to remind me to update some code.
VBA Code:
MsgBox "Reminder: Today's Date is " & Date, vbInformation, "New Year Update Countdown" & vbNewLine _
& "New Year Updates due in " & (Range("VBADaysLeft"))+1 & " days", vbInformation , "Exercise Log"
[The named range "VBADaysLeft" is DATE(YEAR(TODAY()),12,31)-LOOKUP(10^35,A:A) and works perfectly OK]
The problem is, it's commented out because I don't want the above to start running until 25 December each year but I will need reminding the week before the new year each year.
Can this be automated so I start receiving the daily reminder when I open the workbook between 25 December and 1 January, and not just on 25 December? (else I would simply insert the below line)
VBA Code:
If Date = DateSerial(Year(Now), 12, 25) Then
Thanks!
Last edited: