maximum days in a month
Note that days should be signular
lastDay = days(DateSerial(year(dt),Month(dt)+1,0))
should be
lastDay = day(DateSerial(year(dt),Month(dt)+1,0))
sorry for the typo.
--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
the zeroth day of the next month is the last days of the month in question
Dim dt as Date
dt = Date
lastDay = days(DateSerial(year(dt),Month(dt)+1,0))
--
Regards,
Tom Ogilvy
"james" wrote in message
...
hello,
What statement would I use to find out maximun days in a month in VBA?
Thanks in advance
|