XL97: "Bad DLL Calling Convention" When Running a Macro (158905)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This 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:
- 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 97, 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/11/2006 |
---|
Keywords: | kberrmsg kbprb KB158905 |
---|
|