Jakey
I don't have excel 2007 readily available, so there may be a better way, but:
If you have tried calling iit as a built in function and it doesn't work,
then try use evaluate or brackets
res = [Yield(A2,A3,A4,A5,A6,A7,A8)]
or
res = Evaluate("Yield(A2,A3,A4,A5,A6,A7,A8)")
this is essentially a virtual cell on the activesheet.
--
Regards,
Tom Ogilvy
Jaky said:
For Excel 2007, I believe it is native. It doesn't show up in VBA.
:
Yield comes from the Analysis toolpak. It is not an Excel native worksheet
function
If you have Analysis Tookpak VBA installed, you can call it with
(demo'd from the immediate window using the help example from Excel Help on
the Yield Function):
? Application.Run("ATPVBAEN.XLA!Yield",Range("A2"),Range("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Range("A8"))
6.50000068807315E-02
so it produces .065 as it should (according to the help example).
--
Regards,
Tom Ogilvy
:
Hi,
I am wondering why I can not find the Yield function in VBA. I type in
"Application.worksheetfunctions." in the VBA workspace to find the yield
function, and YIELDDISC and YIElDMAT is there, but YIELD is not there? Did
they forget to put it in VBA?