>Private Function GetLastBusinessDay() As Date >Dim LastDay As Date > > 'get the last day of the month by subtracting one day from the first of the next month > LastDay = DateSerial(DatePart("YYYY", Date), DatePart("m", Date) + 1, 0) > > 'Check to see if saturday or sunday > If Format(LastDay, "dddd") = "Sunday" Then > LastDay = LastDay - 2 > Else > If Format(LastDay, "dddd") = "Saturday" Then > LastDay = LastDay - 1 > End If > End If > GetLastBusinessDay = LastDay > >End Function >