MSDN Archive Home
Help and FAQs
KB928208 - Compile and runtime issues for Visual Basic Macros
All Resource Updates
Change History (all pages)
A Hotfix is a product update package with one or more updated product files that fix a specific product problem.
Please be aware this Hotfix has not gone through full Microsoft product regression testing nor has it been tested in combination with other Hotfixes.
Please carefully review the associated Hotfix KB article to verify the fix is the one needed and there are no known compatibility or installation issues. You may also want to contact a Microsoft Support Professional at
FIX: Custom applications that use the Visual Studio for Applications Visual Basic Runtime may be unable to compile macros or to run macros
Consider the following scenario:• You create a custom application by using the Microsoft .NET Framework 2.0.
• The custom application uses the Microsoft Visual Studio for Applications (VSA) Visual Basic Runtime.
• You run the custom application on a system that has been updated to run a later version of the Microsoft .NET Framework common language runtime (CLR).
In this scenario, the custom application may behave incorrectly or may generate errors. These problems occur when you try to compile macros or when you try to run macros in the custom application.
When you are developing the custom application by using VSA, you may experience the following problem. When the custom application calls the Microsoft.VisualBasic.Vsa.VsaEngine.Compile method, an exception is thrown by the VSA Visual Basic Runtime to the host. The host may trap the exception, and the user may receive the following error message:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Alternatively, the host may ignore the exception, and one of the following symptoms may occur:• The host fails unexpectedly when the user tries to run the macro that the user just compiled.
• The host does not handle the macro in any way.
In the latter case, the CLR will close the application because the application had an unhandled exception.
When you try to run macros in the custom application, you may experience one or more of the following symptoms: • You receive an error message that a macro cannot be generated or run.
• You receive an error message that a macro or assembly cannot be loaded.
• The host application may not start or may exit unexpectedly.
• Although the host application does not report an error, the macro does not run, and the application appears to have done nothing.
Additional Information about the issue resolved by this Hotfix can be found in its Knowledge Base article at
Search the list of all other publicly available Visual Studio and .NET Framework Hotfixes at
Jun 23 2008 at 1:32 AM
, version 4
Dec 1 2009 at 11:53 AM
thanks a lot
Sign in to add a comment
Thu Apr 12 2007 at 7:00 AM
More Tags ...
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.