If you reference the atpvbaen.xla add-in in your project, you can use
EDATE in your VBA code:
Public Sub try()
Debug.Print CDate(edate("3/13/2003", 2))
End Sub
returns 5/31/2003
If you want to do your own function:
Public Function EDateToo(baseDate As Date, adder As Integer) As Date
EDateToo = DateSerial(Year(baseDate), Month(baseDate) + _
adder + 1, 0)
End Function
In article <026501c2cb6d$6dd3b520$cef82ecf@TK2MSFTNGXA08>, Markus Glatz
<MGl
...@Amgen.com> wrote:
> Hello,
> is there a solution to "convert" the "add-in" EDATE
> to convert into a VBA-script?
> Thanks in advance
> Bestr regards
> Markus