eomonth funciton in VBA

  • Thread starter Thread starter ExcelMonkey
  • Start date Start date
You can use the Analysis Tool Pack function in VBA by first
loading the "Analysis Tool Pak VBA" add in, then in VBA setting a
reference to ATPVBAEN.xla. Then, you can call the functions
directly as if they were built in to VBA.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
E-M,

Here is a simple function to do it.

Function zEOMONTH(this As Date, Months As Long)
zEOMONTH = DateSerial(Year(this), Month(this) + Months + 1, 0)
End Function


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top