View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Excel VBA 2003: how do I call an Analysis ToolPak function wit

Thanks for that information...

--
Rick (MVP - Excel)



"Dana DeLouis" wrote in message
...
[GetMacroRegId] 'EOMONTH' <
[GetMacroRegId] 'EOMONTH' - '1677852726'


Other calls to Analysis ToolPak functions also seem to produce two
lines of printout to my Immediate Window


Hi. As a side note, this is a known bug that Microsoft refused to fix.
When calling a lot of Fourier Code, this bug really slows the code down.
This issue was fixed in XL 2007.

= = = = = = =
Dana DeLouis

On 4/28/2010 12:29 PM, Rick Rothstein wrote:
While writing your own EOMONTH function would work, you would still get
text printed out in the Immediate Window if you called any of the other
Analysis ToolPak VB functions. It really seems strange to me that the
programmers for the Analysis ToolPak VB functions chose to print
anything out to the Immediate Window when they get called. By the way,
if you wanted a VB function, a much simpler EOMonth function would be
this one-liner...

Public Function EOMonth(DateIn As Date, Optional MonthsToAdd As Long)
EOMonth = DateSerial(Year(DateIn), Month(DateIn) + MonthsToAdd + 1, 0)
End Function