Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

EDATE

0 views
Skip to first unread message

Markus Glatz

unread,
Feb 3, 2003, 5:17:17 AM2/3/03
to
Hello,

is there a solution to "convert" the "add-in" EDATE
to convert into a VBA-script?

Thanks in advance
Bestr regards
Markus


J.E. McGimpsey

unread,
Feb 3, 2003, 6:56:03 AM2/3/03
to
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

0 new messages