+ Reply to Thread
Results 1 to 6 of 6

Calling Application.NORM.S.DIST issue???

  1. #1
    Registered User
    Join Date
    10-31-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    41

    Calling Application.NORM.S.DIST issue???

    I have written the following functions and when I try to evalute it I get #Value in excel. For a test you can use S = 50, K = 60, T = 0.25, R = 0.05, V = 0.3, B = 0.01

    I started having trouble when I tried to use the excel function NORM.S.DIST()

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,803

    Re: Calling Application.NORM.S.DIST issue???

    I think you are calling the function incorrectly. I think you need to use the "worksheet functions" collection of the application object. Follow instructions here: http://msdn.microsoft.com/en-us/libr...ice.15%29.aspx and follow the link to the list of worksheet functions available to visual basic. It appears that norm.s.dist function called from VBA uses underscores for the dots.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    10-31-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Calling Application.NORM.S.DIST issue???

    Ahh the underscores fixed it. The difference between application and worksheet functions is with the error handling: http://www.cpearson.com/excel/callin...ionsinvba.aspx

    Thank you for the help.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Calling Application.NORM.S.DIST issue???

    I think it might be called using:
    Please Login or Register  to view this content.
    But I've never used it and my Excel 2010 machine is switched off right now

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,803

    Re: Calling Application.NORM.S.DIST issue???

    TMS -- I think the difference between the NORMSDIST and NORM.S.DIST (NORM_S_DIST) functions is the latter is the 2010+ implementation. I cannot test them extensively, but they should be essentially the same function. Excel help claims that the newer versions of these functions use improved algorithms to calculate the same quantity. The main questions would probably be around whether you need backwards compatibility to pre 2010 or if you are more of a "forward thinking" programmer and in the mood to abandon all older implementations.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,093

    Re: Calling Application.NORM.S.DIST issue???

    @MrShorty: thanks for the insight. As you might be able to tell, I've never needed to use the function in any of its incarnations.

    Cheers, TMS

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unstable macro when continuously calling Application.Run
    By Donitz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-24-2013, 05:29 AM
  2. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  3. [SOLVED] Calling a button event from a .NEt application
    By Stanley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2006, 08:30 AM
  4. Application level events - calling from standard module
    By triaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2006, 04:30 AM
  5. [SOLVED] Error calling Web Service from Excel Application
    By GPrabaka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2005, 11:05 AM

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