View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
sebastienm sebastienm is offline
external usenet poster
 
Posts: 694
Default maximum days in a month

Hi,
Lat day in a month i given by
Dim d as Date
d=date() '<--- your date here
'last date of month
msgbox MonthLastDay = DateSerial(Year(d), Month(d) + 1, 1 - 1)
'day number
msgbox Day(MonthLastDay = DateSerial(Year(d), Month(d) + 1, 1 - 1))

Regards,
Sebastienm

"james" wrote:

hello,
What statement would I use to find out maximun days in a month in VBA?

Thanks in advance