XL2000: "Bad DLL Calling Convention" When Running a Macro (213554)
The information in this article applies to:
This article was previously published under Q213554 SYMPTOMS
When you run a Visual Basic for Applications macro in Microsoft Excel,
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:
- The Visual Basic macro code contains one or more Declare
Function statements.
-and-
- One of the Declare Function statements refers to a function in a
dynamic-link library file (DLL) that uses the _cdecl calling
convention.
-and-
- Within the code, you make a call to the declared function.
In Microsoft Excel 2000, Visual Basic macros can only call functions that
use the _stdcall calling convention. Functions that use the _cdecl calling
convention are not supported.
Modification Type: | Minor | Last Reviewed: | 10/10/2006 |
---|
Keywords: | kberrmsg kbprb KB213554 |
---|
|