ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Something works, something don't. (https://www.excelbanter.com/excel-programming/294358-something-works-something-dont.html)

y

Something works, something don't.
 
I wrote a custom function in VBA..

Function Test(Classe, osserv As Range, Dist As String, ParA As Double, ParB As Double) As Single
....
TMP AS double
....
Tmp = .Weibull(Classe(1), ParA, ParB, True) - .Weibull(0, ParA, ParB, True)
....
Tmp = .Distrib.Exp(Classe(1), ParA, True) - .Distrib.Exp(0, ParA, True)
....
Tmp = .Distrib.GAMMA(Classe(1), ParA, ParB, True) - .Distrib.GAMMA(0, ParA, ParB, True)

....

the first statement works fine.
The other two ones don't.

The parameters values are ParA=2 ParB=2 e Classe(1)=2

I included the three statements inside

"with Application.worksheet

....

end with".

May anybody help me, please? I can post the entire function.

Thanks Alex.


y

Something works, something don't.
 
F2 - GammaDist ! instead of .Distrib.GAMMA etc...

Thanks to Sonny Kocak!

Alex.


Wei-Dong Xu [MSFT]

Something works, something don't.
 
Hi Alex,

Is this issue resolved? Don't hesitate to let me know if you have any question.

Best Regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.




All times are GMT +1. The time now is 09:20 PM.

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