View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike Middleton Mike Middleton is offline
external usenet poster
 
Posts: 762
Default Yield() function missing from XL2007 SP1 ATPVBAEN Analysis Too

RW -

Seems to be a bug. That is, in Excel 2007 SP1 the YIELD function works fine
in a worksheet cell, but it's not available using
Application.WorksheetFunction in VBA.

- Mike


"Ron West" wrote in message
...
But... are you aware that (unlike functions like EDate that are now been
made
into WorksheetFunctions), the Yield() function is not one of them?

Try this, and you will not find the Yield() function:-

Sub xx()
yy = WorksheetFunction.[press 'y' here]

End Sub

There are two other Yield-like functions (YieldDisc and YieldMat) in the
WorksheetFunctions, but these cannot be replacements for Yield() as they
do
not have the same number of parameters.

RW


"Mike Middleton" wrote:

Ron West -

It's not clear to me from your post: Are you aware that functions that
are
part of the Analysis ToolPak in Excel 2003 (and earlier) are native
worksheet functions in Excel 2007 (not requiring the Analysis ToolPak
add-in)?

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel



"Ron West" wrote in message
...
I have a spreadsheet that worked fine in XL2003 using the ATPVBAEN.XLA
Analysis ToolPak, but now that our local IT department have forced us
all
to
"upgrade" to XL2007 SP1 it has stopped working because it can't find
the
Yield() function from the new XL2007 ATPVBAEN.XLAM version of the
ToolPak.

Using the Object Browser confirms that the function is no longer there.

However, if I deregister the new XLAM and register the old XLA file,
the
Yield() function appears back in the Object Browser and the spreadsheet
compiles OK, BUT I now get unsolvable "Error 2015 - Type Mismatch"
errors.

(After some Googling, I have tried to ensure the date format is correct
for
the first 2 parameters but the Error 2015 will not go away from the
XL2007
run whatever I do).

Can anyone help?