Calling C++ function from Excel and VBA using DLL created in C++

后端 未结 4 2047
情话喂你
情话喂你 2020-12-16 21:14

I created a DLL containing a function named \"koduj\". Calling this function by using it inside an Excel worksheet cell returns the desired result. Calling \"koduj\" from VB

4条回答
  •  误落风尘
    2020-12-16 21:35

    I'm guessing from the magnitude of the error that it's the numeric parameter that's going wrong - I would try more explicitly declaring the parameter type in your test VBA routine (probably Integer) and accepting it as that specific type on the C++ side (signed short, in that case).

    There's a great Microsoft article about all this at http://msdn.microsoft.com/en-us/library/office/bb687915(v=office.15).aspx.

提交回复
热议问题