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

okj, i'll try to re-write my previous post without error this time:
Dim d as Date
d=date() '<--- your date here
'last date of month
msgbox DateSerial(Year(d), Month(d) + 1, 1 - 1)
'day number
msgbox Day(DateSerial(Year(d), Month(d) + 1, 1 - 1))

sebastienm