01-05-2012, 01:24 AM
Currently I have the following code:
As is (which i just now found out in January) that when Now = 1, thus intMonth = 1, and Min1Month = 0.
When Now is <= 6, thus Min6Month = -5 to 0
What code is approprioate to use in both cases? How can I keep Min1Month and Min6Month between 1 and 12?
I have tried a few wzys other than going to a If Then for each case.
Thoughts?
Code:
intMonth = Month(Now) ' 9
ThisMonth = MonthName(intMonth) ' "September"
Min1Month = MonthName(intMonth - 1) ' "August"
Min6Month = MonthName(intMonth - 6)
As is (which i just now found out in January) that when Now = 1, thus intMonth = 1, and Min1Month = 0.
When Now is <= 6, thus Min6Month = -5 to 0
What code is approprioate to use in both cases? How can I keep Min1Month and Min6Month between 1 and 12?
I have tried a few wzys other than going to a If Then for each case.
Thoughts?