Article ID: 158905 - Last Review: October 11, 2006 - Revision: 1.2 XL97: "Bad DLL Calling Convention" When Running a MacroThis article was previously published under Q158905 SYMPTOMS
When you run a Visual Basic for Applications macro in Microsoft Excel 97,
you may receive the following error message:
Run-time error '49': Bad DLL calling convention CAUSE
This problem may occur when all of the following conditions are true:
MORE INFORMATION
DLLs in Microsoft Windows support two main calling conventions:
_cdecl and _stdcall. Most 32-bit DLLs that are included with Microsoft
Windows 95 and Microsoft Windows NT support the _stdcall calling
convention; the _cdecl calling convention is generally used by older DLLs.
If a DLL supports only the _cdecl calling convention, you cannot call functions in that DLL from a Visual Basic macro in Microsoft Excel 97. For example, if your code includes the following function declaration: NOTE: In earlier versions of Microsoft Excel, you can make calls to functions that use the _cdecl calling convention. | Article Translations
|


Back to the top
