+ Reply to Thread
Results 1 to 4 of 4

XIrr in VBA error

  1. #1
    CyberBuzzard
    Guest

    XIrr in VBA error

    I have setup the reference to ATPVBAEN.XLS in my project, the Add-In is
    installed in Excel, I also found the function in the Object Browser under
    atpvbaen.xls.VBA Functions and Subs.

    Nevertheless I can't make my code work, getting the "Object doesn't support
    this property or method" prompt, when writen like this:

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

    I would greatly appreciate if someone can help me with this.

    --
    Any help will be appreciated.

    Regards,

    CyberBuzzard

  2. #2
    Chip Pearson
    Guest

    Re: XIrr in VBA error

    I replied to your post an hour ago. What I wrote was....


    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:BC46E3FB-031F-42B2-9FB5-D6ED7D6FE5EC@microsoft.com...
    >I have setup the reference to ATPVBAEN.XLS in my project, the
    >Add-In is
    > installed in Excel, I also found the function in the Object
    > Browser under
    > atpvbaen.xls.VBA Functions and Subs.
    >
    > Nevertheless I can't make my code work, getting the "Object
    > doesn't support
    > this property or method" prompt, when writen like this:
    >
    > rngXIrrCalc =
    > Application.WorksheetFunction.XIrr(rng1, rng2)
    >
    > I would greatly appreciate if someone can help me with this.
    >
    > --
    > Any help will be appreciated.
    >
    > Regards,
    >
    > CyberBuzzard




  3. #3
    Ron Rosenfeld
    Guest

    Re: XIrr in VBA error

    On Thu, 22 Dec 2005 11:36:04 -0800, CyberBuzzard <cyberbuzzard@hotmail.com>
    wrote:

    >I have setup the reference to ATPVBAEN.XLS in my project, the Add-In is
    >installed in Excel, I also found the function in the Object Browser under
    >atpvbaen.xls.VBA Functions and Subs.
    >
    >Nevertheless I can't make my code work, getting the "Object doesn't support
    >this property or method" prompt, when writen like this:
    >
    > rngXIrrCalc = Application.WorksheetFunction.XIrr(rng1, rng2)
    >
    >I would greatly appreciate if someone can help me with this.


    Since you did not find the XIRR function in the WorksheetFunction class, that
    means it is not a member of that class. Hence your error message.

    After setting the reference as you did, you should be able to use XIRR as you
    would any other function.

    e.g.:

    rngXIrrCalc = XIrr(rng1, rng2)


    --ron

  4. #4
    CyberBuzzard
    Guest

    Re: XIrr in VBA error

    Sorry about that, I didn't seem to find my initial post on the list of recent
    posts, and I thought I would better post it again lest I may have made a
    mistake in the initial process.

    Thank you again, Chip
    --
    Any help will be appreciated.

    Regards,

    CyberBuzzard


    "Chip Pearson" wrote:

    > I replied to your post an hour ago. What I wrote was....
    >
    >
    > 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:BC46E3FB-031F-42B2-9FB5-D6ED7D6FE5EC@microsoft.com...
    > >I have setup the reference to ATPVBAEN.XLS in my project, the
    > >Add-In is
    > > installed in Excel, I also found the function in the Object
    > > Browser under
    > > atpvbaen.xls.VBA Functions and Subs.
    > >
    > > Nevertheless I can't make my code work, getting the "Object
    > > doesn't support
    > > this property or method" prompt, when writen like this:
    > >
    > > rngXIrrCalc =
    > > Application.WorksheetFunction.XIrr(rng1, rng2)
    > >
    > > I would greatly appreciate if someone can help me with this.
    > >
    > > --
    > > Any help will be appreciated.
    > >
    > > Regards,
    > >
    > > CyberBuzzard

    >
    >
    >


+ 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