Sub macro1()
MsgBox getall(#1/1/2008#, #9/15/2008#)
End Sub
Function getall(ByVal d1 As Date, ByVal d2 As Date) As String
Dim s() As String, i As Long
ReDim s(Month(d1) To Month(d2))
For i = LBound(s) To UBound(s)
s(i) = Format(DateSerial(Year(d1), i + 1, 0), "mmm=d") & " days"
Next
s(LBound(s)) = Format(d1, "mmm=") & DateSerial(Year(d1), Month(d1) + 1, 0) - d1 & " days"
s(UBound(s)) = Format(d2, "mmm=d") & " days"
getall = Join(s, ",")
End Function