I am not sure if you want a worksheet function or a
VB cide solution but for the worksheet use
=EOMONTH(NOW(),-1) for the the end date (last day of previouse month)
and
=EOMONTH(NOW(),-2)+1 for the start date; (first day of previous month)
In code the following will do the same job
Sub SetDates(ByRef dStart As Date, ByRef dEnd As Date)
dEnd = DateAdd("d", -Day(Date), Date)
dStart = DateAdd("d", -Day(dEnd), dEnd) + 1
End Sub
Hope this coveres it
MTB