Hi
I have tried to make a super simple C++ function and call it from VBA, but I keep getting Runtime error '49'. Bad Dll Calling Convention.
Any help is appreciated.
The C++ function:
extern "C" __declspec(dllexport) int testFunction(char* font) { mdlDialog_openAlert(font); return 0; }
And the VBA Macro:
Declare Function testFunction Lib "mylib.dll" (ByVal stringP As String) As Long Sub Macro1() testFunction ("Test") End Sub