Article ID: 158905
Article Last Modified on 10/11/2006
APPLIES TO
- Microsoft Excel 97 Standard Edition
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.
Additional query words: XL97
Keywords: kberrmsg kbprb KB158905