G
Guest
I created the following function from various VBA functions. When I am
expecting to retrieve the value of December from the function, but it keeps
saying LastMonth is Null when I set my system date to January. This is
isolated to the month of January only.
Public Function LastMonth()
LastMonth = MonthName(Month(Now()) - 1)
End Function
Can anyone help with this abberation? Thanks!
expecting to retrieve the value of December from the function, but it keeps
saying LastMonth is Null when I set my system date to January. This is
isolated to the month of January only.
Public Function LastMonth()
LastMonth = MonthName(Month(Now()) - 1)
End Function
Can anyone help with this abberation? Thanks!