I found a comment (quote) "Note how we pass the time of 15 minutes to the Public Variable dTime This is so we can have the OnTime Method cancelled in the Workbook_BeforeClose Event by setting the optional Schedule argument set to False. If we didn't pass the time to a variable Excel would not know which OnTime Method to cancel as Now + TimeValue("00:15:00")is NOT static, but is when passed to a variable. If we didn't set the optional Schedule argument set to False the Workbook would automatically open every 15 minutes after closing it and run MyMacro" (end) which could be useful to you. It was from http://www.ozgrid.com/Excel/run-macro-on-time.htmOriginally Posted by LFCFan
I see no purpose in te red code, unless you are aware of something else.
for "If WeekDay(Now) = 7 Then
saturday
ElseIf WeekDay(Now) = 1 Then
sunday
ElseIf WeekDay(Now) <> 7 And WeekDay(Now) <> 1 Then"
you have already removed 7 and 1, so why the need to re-test. same in SendIt, you went to sat on day 7, sunday on day 1, and SendIt for the other days, so the point of testing 7 & 1 in SendIt seems wasted.
Does this help you?
---
Bookmarks