XLL+ Class Library

Calling the COM methods

To call an add-in function via a COM wrapper, you should:

  1. Add a reference to your COM library.
  2. Create an instance of the add-in class.
  3. Call the methods of the add-in class.
  4. Destroy the add-in class instance, explicitly, by setting the instance to null, or implicitly, by allowing the instance to go out of scope.

For example, to invoke the NORMSDIST2 function from the Tutorial1 XLL:

    Dim addin As New Tutorial1Lib.Tutorial1
    MsgBox addin.NORMSDIST2(0.5)
    Set addin = Nothing

Performance issues

See also the remarks on Performance considerations.

See Also

XLL+ COM wrapper generator | Using the wrapper generator | Generated code