How to refer to Excel macros (not functions) in .XLAM addin saved outside Personal Macro folder in Excel 2016/2019?

后端 未结 2 1665
故里飘歌
故里飘歌 2020-12-11 10:34

We can create an .XLAM addin with custom functions (UDF). Once we connect Excel to the addin, these UDFs can then be called from another workbook regardless of where the add

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 11:12

    If the add-in is loaded, you can call any sub/function with the following code
    Sub: Application.Run "YourAddinSub",param1, param2, ...
    Function: Application.Run("YourAddinFunction",param1, param2, ...)

    If needed, you can qualify the sub. For example: YourAddin.YouAddinSub

提交回复
热议问题