Gentlemen, Thank you all for your interest. All of you are way ahead of me. This code certainly is elegant. I have been studying it all weekend.
I used to code elegant stuff like this in COBOL that nobody else could understand.
And right now, I am studying this line in the code:
DateDue = DateAdd("d", iDays Mod 5, DateAdd("ww", Int(iDays / 5), vDate))
This is very compact and elegant!
It will take me a few days to understand it because I have to study the basics first, and frankly, while this is really fun and really useful to me personally, I have many other responsibilities.
All of your words seem like gold to me. Thank you!
And yes, later I need to be able to add about ten different holidays, some of which change yearly. Christmas is always December 25, but our United States Thanksgiving Holiday is never on the same date. So I would need to be able to change the holiday dates.
Last edited by StephenRay; 07-24-2017 at 06:06 AM.
Reason: One more comment
|