ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "Unable to get the NormSInv property of the WorksheetFunction clas (https://www.excelbanter.com/excel-worksheet-functions/7882-%22unable-get-normsinv-property-worksheetfunction-clas.html)

David Roodman

"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

Jerry W. Lewis

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




All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com