ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   eomonth funciton in VBA (https://www.excelbanter.com/excel-programming/291034-eomonth-funciton-vba.html)

ExcelMonkey[_83_]

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

Thanks


---
Message posted from http://www.ExcelForum.com/


Chip Pearson

eomonth funciton in VBA
 
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



"ExcelMonkey " wrote
in message ...
Is there a funciton in VBA that is similar to the eomonth

function in
excel?

Thanks


---
Message posted from http://www.ExcelForum.com/




Bob Phillips[_6_]

eomonth funciton in VBA
 
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)

"ExcelMonkey " wrote in message
...
Is there a funciton in VBA that is similar to the eomonth function in
excel?

Thanks


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 11:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com