Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David Roodman
 
Posts: n/a
Default "Unable to get the NormSInv property of the WorksheetFunction clas

Hello.
I am writing a function in Excel 2002. In context, the following watch
expression works fine:
Application.WorksheetFunction.NormSInv((1)
But this one:
Application.WorksheetFunction.NormSInv(1)
generates the value:
<Unable to get the NormSInv property of the WorksheetFunction class

Both NormSInv and NormSInv are listed in my object browser window, and as
taking one argument. Does anyone have any idea what's going on here? I'll be
grateful for any help you can offer.
David Roodman
Center for Global Development
Washington, DC
  #2   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

Neither expression works. The first has unmatched parentheses, but
otherwise both are identical. If the following does not answer your
question, repost without the typos.

In this case the "Unable to get ... property ..." error is telling you
that NormSInv() is not returning a number. That is to be expected,
since NormSInv(1) is infinite, as is NormSInv(0). Correspondingly, in a
worksheet cell,
=NORMSINV(1)
and
=NORMSINV(0)
will return #NUM!

Since Excel 97, VBA has required explicit error handling for calls to
worksheet functions. To use
Application.WorksheetFunction.NormSInv(p)
you either need to ensure that 0<p<1, or else have an On Error statement

Jerry

David Roodman wrote:

Hello.
I am writing a function in Excel 2002. In context, the following watch
expression works fine:
Application.WorksheetFunction.NormSInv((1)
But this one:
Application.WorksheetFunction.NormSInv(1)
generates the value:
<Unable to get the NormSInv property of the WorksheetFunction class

Both NormSInv and NormSInv are listed in my object browser window, and as
taking one argument. Does anyone have any idea what's going on here? I'll be
grateful for any help you can offer.
David Roodman
Center for Global Development
Washington, DC


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
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 06:06 AM.

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"