Sometimes when you are creating a macro in VBA, there comes a time when you need to determine the current day of the year. For example, you might want to know that March 15 is the 74th day of the year.
Luckily, VBA includes a nifty little function that will allow you to speedily determine the current day of the year and the bonus is – it’s very easy to to!
Follow the steps below to learn how:
iThisDay = DatePart("y", Date)
When executed, iThisDay will be equal to the current day number.