Runtime Error 49, Bad DLL calling convention

后端 未结 8 1757
闹比i
闹比i 2020-12-29 12:10

Q. Excel keeps throwing the following error, whenever my addin is loaded (Runtime Error 49, Bad DLL calling convention)

8条回答
  •  北海茫月
    2020-12-29 12:24

    This error is probably occurring because of a compiler-bug. The easiest solution to this, would be to make a small code-change and recompile. What I usually do is,

    1 -> Add a Private Enum type to the top of any module in the addin

    Private Enum Something
        member = 1
    End Enum
    

    2 -> Compile the addin

    3 -> Restart excel

    4 -> Remove the code change made. It is no longer necessary.

提交回复
热议问题