Error calling function from Excel

C

cbjames

I am using a call function within a Microsoft Access database to do a
"NormDist". It work great about three out of four runs. Then I get the
following error message "Unable to get the NormDist property of the
WorksheetFunction class." If I Exit the database and reOpen it usually (not
always) when then complete the call. Anyone have any ideas?
 
T

Tom van Stiphout

On Mon, 27 Apr 2009 17:21:01 -0700, cbjames

I'm thinking you're not closing the objects correctly, but why don't
you post your code, stripped to the essentials, so we don't have to
guess at it.

-Tom.
Microsoft Access MVP
 
C

cbjames

Here is the code. thanks! FOR YOUR HELP.
****
Public Function P(x As Double, Mu As Double, StdDev As Double) As Double
P = Excel.WorksheetFunction.NormDist(x, Mu, StdDev, True) '
End Function
****
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top