eomonth funciton in VBA

  • Thread starter Thread starter ExcelMonkey
  • Start date Start date
E

ExcelMonkey

Is there a funciton in VBA that is similar to the eomonth function in
excel?

Thanks
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top