Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Yield function in VBA

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Yield function 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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Yield function in VBA

I know in 2003 and earlier it was not a native function. I should have
clarified. For Excel 2007, it does not seem to show up. I am still having the
same problem.

"Tom Ogilvy" wrote:

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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Yield function in VBA

For Excel 2007, I believe it is native. It doesn't show up in VBA.

"Tom Ogilvy" wrote:

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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Yield function in VBA

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" wrote:

For Excel 2007, I believe it is native. It doesn't show up in VBA.

"Tom Ogilvy" wrote:

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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Yield function in VBA



"Tom Ogilvy" wrote:

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" wrote:

For Excel 2007, I believe it is native. It doesn't show up in VBA.

"Tom Ogilvy" wrote:

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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Yield function in VBA

Hi Tom,
I tried using that fix and it did not work. I looked in the object browser
for vba and the "yield" function is not in that area. I am not sure what else
to do.
-Jaky

"Tom Ogilvy" wrote:

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" wrote:

For Excel 2007, I believe it is native. It doesn't show up in VBA.

"Tom Ogilvy" wrote:

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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Yield function in VBA

I tried that fix, but it did not work. I looked in the object browser and the
yield function isn't there.

"Tom Ogilvy" wrote:

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" wrote:

For Excel 2007, I believe it is native. It doesn't show up in VBA.

"Tom Ogilvy" wrote:

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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Yield function in VBA

Same problem!

I have upgraded to Excel 2007 and the VBA is breaking on the YIELD function.
It is throwing a "not defined" error. Where is the YIELD function!?

I have ATP installed and active. What do I do now?

-Thanks

Steve


"Jaky" wrote:

I tried that fix, but it did not work. I looked in the object browser and the
yield function isn't there.

"Tom Ogilvy" wrote:

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" wrote:

For Excel 2007, I believe it is native. It doesn't show up in VBA.

"Tom Ogilvy" wrote:

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"),R ange("A3"), _
Range("A4"),Range("A5"),Range("A6"),Range("A7"),Ra nge("A8"))
6.50000068807315E-02

so it produces .065 as it should (according to the help example).

--
Regards,
Tom Ogilvy


"Jaky" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Current Yield vs. Yield to Maturity at low prices beariebird Excel Worksheet Functions 1 November 19th 09 08:50 PM
what is PAR in the Yield Function Sanjeev Excel Worksheet Functions 1 August 30th 06 03:07 PM
Yield function Prashant Shah Excel Programming 3 October 24th 05 05:26 AM
yield function jeff4860 Excel Worksheet Functions 1 July 1st 05 02:43 AM
yield function mike allen[_2_] Excel Programming 9 December 31st 04 08:36 PM


All times are GMT +1. The time now is 05:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"