E ExcelMonkey Feb 11, 2004 #1 Is there a funciton in VBA that is similar to the eomonth function in excel? Thanks
C Chip Pearson Feb 11, 2004 #2 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
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
B Bob Phillips Feb 11, 2004 #3 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)
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)