Function FirstDayInMonth(Optional dtmDate As Variant) As Date If IsMissing(dtmDate) Then dtmDate = Date FirstDayInMonth = Fix(DateSerial(year(dtmDate), Month(dtmDate), 1)) End Function