Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

VBA and Managed Code Extensions Compared

Microsoft Visual Basic for Applications (VBA) uses unmanaged code that is tightly integrated with Office applications. Managed code extensions in Microsoft Visual Studio 2005 Tools for the Microsoft Office System projects enable you to take advantage of the .NET Framework 2.0 and Visual Studio design tools.

Comparison

The following table provides a basic comparison between VBA and managed code extensions.

Visual Basic for Applications Managed Code Extensions

Uses code that is connected to and persisted with the document.

Code is stored separately from the document.

Works with the Office object models and Visual Basic for Applications APIs.

Works with the Office object models and the .NET Framework APIs.

Designed for macro recording and a simplified developer experience.

Designed for security, easier code maintenance, and the ability to use the full Visual Studio integrated development environment (IDE).

Works well for solutions that benefit from a very tight integration with Office applications (IDE, menus, toolbar buttons, and so on).

Works well for solutions based on Word documents and Excel workbooks, where the full resources of Visual Studio and the .NET Framework can be used.

Has limitations for the enterprise, especially in the areas of security and deployment.

Designed for use in the enterprise.

Some things are still easier to do quickly using VBA. Specifically, you might want to continue using VBA for:

  • Custom worksheet functions.

  • Macro recording.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft