Here's how I would handle it:
Sub DateCalc()
Dim LastMon, LastDay, CurYear
Dim CurMon, ldtStart, ldtEnd
CurYear = Year(Now)
LastMon = Month(Now) - 1
Select Case LastMon
Case 2
If (Month(DateSerial(CurYear, 2, 29)) = 2) Then
LastDay = 29
Else
LastDay = 28
End If
Case 4, 6, 9, 11
LastDay = 30
Case Else
LastDay = 31
End Select
ldtStart = Format(DateSerial(CurYear, LastMon, 1), "MM/DD/YYYY")
ldtEnd = Format(DateSerial(CurYear, LastMon, LastDay), "MM/DD/YYYY")
MsgBox ldtStart & Chr(13) & ldtEnd
End Sub
this should work no matter WHAT day of the month you decided to run the
scheduled task.
It would always execute for the previous month.
hope this helps.