+ Reply to Thread
Results 1 to 10 of 10

XIRR in VB

  1. #1
    Nuraq
    Guest

    XIRR in VB

    How can I use the XIRR function provided in the Analysis Toolpak in VB?



  2. #2
    Bruno Campanini
    Guest

    Re: XIRR in VB

    "Nuraq" <nuraq@mweb.co.za> wrote in message
    news:dnbm39$3on$1@ctb-nnrp2.saix.net...
    > How can I use the XIRR function provided in the Analysis Toolpak in VB?


    Good question!
    IRR is both a worksheet and VBA function;
    some other functions, like MAX(), are worksheet
    functions you can use in VBA with WorksheetFunction.MAX().
    XIRR is a worksheet function which is not listed among the
    ones to be also used in VBA with WorksheetFunction.XIRR().

    I am with you waiting for somebody else's discovery...

    Bruno



  3. #3
    Andrew Taylor
    Guest

    Re: XIRR in VB

    You need to:
    - Select "Analysis Toolpack - VBA" as an Add-in
    and
    - Add a reference to it in VBA: Select Tools/References, and
    check atpvbaen.xls (possibly the "en" part will be different
    for non-English versions of Excel)

    The extra functions will then be available in VBA.





    Bruno Campanini wrote:
    > "Nuraq" <nuraq@mweb.co.za> wrote in message
    > news:dnbm39$3on$1@ctb-nnrp2.saix.net...
    > > How can I use the XIRR function provided in the Analysis Toolpak in VB?

    >
    > Good question!
    > IRR is both a worksheet and VBA function;
    > some other functions, like MAX(), are worksheet
    > functions you can use in VBA with WorksheetFunction.MAX().
    > XIRR is a worksheet function which is not listed among the
    > ones to be also used in VBA with WorksheetFunction.XIRR().
    >
    > I am with you waiting for somebody else's discovery...
    >
    > Bruno



  4. #4
    Andrew Taylor
    Guest

    Re: XIRR in VB

    You need to:
    - Select "Analysis Toolpack - VBA" as an Add-in
    and
    - Add a reference to it in VBA: Select Tools/References, and
    check atpvbaen.xls (possibly the "en" part will be different
    for non-English versions of Excel)

    The extra functions will then be available in VBA.





    Bruno Campanini wrote:
    > "Nuraq" <nuraq@mweb.co.za> wrote in message
    > news:dnbm39$3on$1@ctb-nnrp2.saix.net...
    > > How can I use the XIRR function provided in the Analysis Toolpak in VB?

    >
    > Good question!
    > IRR is both a worksheet and VBA function;
    > some other functions, like MAX(), are worksheet
    > functions you can use in VBA with WorksheetFunction.MAX().
    > XIRR is a worksheet function which is not listed among the
    > ones to be also used in VBA with WorksheetFunction.XIRR().
    >
    > I am with you waiting for somebody else's discovery...
    >
    > Bruno



  5. #5
    Ron Rosenfeld
    Guest

    Re: XIRR in VB

    On Fri, 9 Dec 2005 12:25:48 +0200, "Nuraq" <nuraq@mweb.co.za> wrote:

    >How can I use the XIRR function provided in the Analysis Toolpak in VB?
    >


    Set a reference to atpvbaen.xls. Then you can use the XIRR function like any
    VBA function.


    --ron

  6. #6
    Bruno Campanini
    Guest

    Re: XIRR in VB

    "Ron Rosenfeld" <ronrosenfeld@nospam.org> wrote in message
    news:9dqip19fhse700jjru5pi7vj5r4jvkdt4a@4ax.com...

    Thank you Ron & Andrew for very useful info.

    Just a small sub-question:
    How can I get the list of functions added by ATPVBAEN.XLA?

    Bruno



  7. #7
    Norman Jones
    Guest

    Re: XIRR in VB

    Hi Bruno,

    > How can I get the list of functions added by ATPVBAEN.XLA?


    If you have set a reference to Atpvbaen.xls in the VBE, hit F2 to open the
    object browser, in the first dropdown box select Atpvbaen.xls, in the
    Classes pane select VBA Functions. The functions will then be displayed in
    the next pane.


    ---
    Regards,
    Norman



    "Bruno Campanini" <bruno.campanini@tin.it> wrote in message
    news:%23HhxxtL$FHA.3568@TK2MSFTNGP09.phx.gbl...
    > "Ron Rosenfeld" <ronrosenfeld@nospam.org> wrote in message
    > news:9dqip19fhse700jjru5pi7vj5r4jvkdt4a@4ax.com...
    >
    > Thank you Ron & Andrew for very useful info.
    >
    > Just a small sub-question:
    > How can I get the list of functions added by ATPVBAEN.XLA?
    >
    > Bruno
    >
    >




  8. #8
    Bruno Campanini
    Guest

    Re: XIRR in VB

    "Norman Jones" <normanjones@whereforartthou.com> wrote in message
    news:ORKCnMM$FHA.2608@TK2MSFTNGP11.phx.gbl...

    > Hi Bruno,
    >
    >> How can I get the list of functions added by ATPVBAEN.XLA?

    >
    > If you have set a reference to Atpvbaen.xls in the VBE, hit F2 to open the
    > object browser, in the first dropdown box select Atpvbaen.xls, in the
    > Classes pane select VBA Functions. The functions will then be displayed in
    > the next pane.
    >
    >
    > ---
    > Regards,
    > Norman


    Thank you Norman, you are my Bible...

    Ciao
    Bruno



  9. #9
    CyberBuzzard
    Guest

    Re: XIRR in VB

    I have setup the reference to ATPVBAEN.XLS, and I have also found the XIrr
    function according to what Noman.

    The problem I have is that I keep getting the "Object doesn't support this
    property or method" prompt when running code with that function included like
    this:

    rngXIrr = Application.WorksheetFunction.XIrr(rng1, rng2)

    The ATPVBAEN.XLS Add-In is installed in Excel.

    How do I actually write the code to utilize this function?


    --
    Any help will be appreciated.

    Regards,

    CyberBuzzard


    "Norman Jones" wrote:

    > Hi Bruno,
    >
    > > How can I get the list of functions added by ATPVBAEN.XLA?

    >
    > If you have set a reference to Atpvbaen.xls in the VBE, hit F2 to open the
    > object browser, in the first dropdown box select Atpvbaen.xls, in the
    > Classes pane select VBA Functions. The functions will then be displayed in
    > the next pane.
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Bruno Campanini" <bruno.campanini@tin.it> wrote in message
    > news:%23HhxxtL$FHA.3568@TK2MSFTNGP09.phx.gbl...
    > > "Ron Rosenfeld" <ronrosenfeld@nospam.org> wrote in message
    > > news:9dqip19fhse700jjru5pi7vj5r4jvkdt4a@4ax.com...
    > >
    > > Thank you Ron & Andrew for very useful info.
    > >
    > > Just a small sub-question:
    > > How can I get the list of functions added by ATPVBAEN.XLA?
    > >
    > > Bruno
    > >
    > >

    >
    >
    >


  10. #10
    Chip Pearson
    Guest

    Re: XIRR in VB

    To call functions in the ATP, once you have set a reference to
    the Add-In, simply call them by name, without any prefixing.

    rngXIrr = XIrr(...)

    If there is a possibility of name collision (e.g., you have a
    function with the same name as an ATP function), you can prefix
    the function with the library name:

    rngXIrr = [atpvbaen.xls].XIrr(...)


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "CyberBuzzard" <cyberbuzzard@hotmail.com> wrote in message
    news:E6691CBB-0BF5-4198-A434-2C91D270EF22@microsoft.com...
    >I have setup the reference to ATPVBAEN.XLS, and I have also
    >found the XIrr
    > function according to what Noman.
    >
    > The problem I have is that I keep getting the "Object doesn't
    > support this
    > property or method" prompt when running code with that function
    > included like
    > this:
    >
    > rngXIrr = Application.WorksheetFunction.XIrr(rng1,
    > rng2)
    >
    > The ATPVBAEN.XLS Add-In is installed in Excel.
    >
    > How do I actually write the code to utilize this function?
    >
    >
    > --
    > Any help will be appreciated.
    >
    > Regards,
    >
    > CyberBuzzard
    >
    >
    > "Norman Jones" wrote:
    >
    >> Hi Bruno,
    >>
    >> > How can I get the list of functions added by ATPVBAEN.XLA?

    >>
    >> If you have set a reference to Atpvbaen.xls in the VBE, hit F2
    >> to open the
    >> object browser, in the first dropdown box select
    >> Atpvbaen.xls, in the
    >> Classes pane select VBA Functions. The functions will then be
    >> displayed in
    >> the next pane.
    >>
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >>
    >> "Bruno Campanini" <bruno.campanini@tin.it> wrote in message
    >> news:%23HhxxtL$FHA.3568@TK2MSFTNGP09.phx.gbl...
    >> > "Ron Rosenfeld" <ronrosenfeld@nospam.org> wrote in message
    >> > news:9dqip19fhse700jjru5pi7vj5r4jvkdt4a@4ax.com...
    >> >
    >> > Thank you Ron & Andrew for very useful info.
    >> >
    >> > Just a small sub-question:
    >> > How can I get the list of functions added by ATPVBAEN.XLA?
    >> >
    >> > Bruno
    >> >
    >> >

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1