function dd()
dd = Date()
dd = dateadd("m",1,dd)
dd = Cdate(Year(dd) & "-" & Month(dd) & "-1")
dd=dateadd("d",dd,-1)
dd=day(dd)
end function
dd = Date()
dd = dateadd("m",1,dd)
dd = Cdate(Year(dd) & "-" & Month(dd) & "-1")
dd=dateadd("d",dd,-1)
dd=day(dd)
end function