开发者

Calling a Add-in function from Excel's VBA

开发者 https://www.devze.com 2023-01-03 16:11 出处:网络
I am using an Excel Add-in for an Erlangs: http://abstractmicro.com/erlang开发者_StackOverflow/helppages/ref-erlbblockage.htm

I am using an Excel Add-in for an Erlangs: http://abstractmicro.com/erlang开发者_StackOverflow/helppages/ref-erlbblockage.htm

I try to call the Erlang-B function within the Add-in from within VBA thus:

Function Erl(Erlangs As Double, Capacity As Double)
    Erl = Application.WorksheetFunction.ErlbBlockage(Capacity, Erlangs)
End Function

...but it doesn't work. I get #VALUE! returned in the Excel cell. I think it is because the function is not part of standard Excel (it is in the Add-in). So how do I call it?


Try setting a reference in your VBA project to the Erlang Addin
VBE-->Tools-->References check A_Erlang

Then you can call the functions in the addin directly from VBA

Myvar = ErlbBlockage(capacity, erlangs)
0

精彩评论

暂无评论...
验证码 换一张
取 消