AutoCAD Services & Support

Microsoft Visual Basic for Applications Module FAQ

What is Microsoft Visual Basic for Applications (VBA)?
Microsoft Visual Basic for Applications (VBA) is an embeddable programming environment designed to enable developers to build custom solutions using the full power of Microsoft Visual Basic. Developers using applications that host VBA can automate and extend the application functionality, shortening the development cycle of custom business solutions.

What is the status of VBA support in the AutoCAD 2010 product line?
Autodesk has begun the transition of VB customization from VBA to .NET technology. This transition will occur over a few years. During this time, Autodesk will provide documentation and other assistance to help our customers and developers migrate from VBA to this new automation technology.

What happens to my product installation if I do not download and install the VBA module for AutoCAD 2010 products?
If you utilize VBA macros in your work environment, these will no longer work unless the VBA module is installed on your system.

Which Autodesk products are affected by this change?
This change affects AutoCAD 2010, AutoCAD® Architecture 2010, AutoCAD® MEP 2010, AutoCAD® Electrical 2010, AutoCAD® Map 3D 2010, and AutoCAD® Mechanical 2010 software. It does not affect Autodesk® Inventor® 2010 and AutoCAD® Civil 3D® 2010 software, which will continue to have VBA delivered in the box. By downloading and installing the VBA module, you will get full support of VBA. This module does not add VBA support to any other Autodesk product that is not based on AutoCAD 2010 (including AutoCAD LT® 2010 software).

What languages are supported with this install?
The VBA module installer is available in English only. However, it is global and can be installed on all language versions of AutoCAD 2010-based products. The VBA module will install the correct language resources on the target platform.

Will this one VBA module install on all AutoCAD 2010-based products that used to ship with VBA support, such as AutoCAD Architecture, AutoCAD Mechanical, and AutoCAD Map 3D?
Yes, the VBA module will install on all supported AutoCAD 2010 products.

How can users who depend on VBA get the bits to enable their functionality?
VBA will not be available on the installation disc, but is available as a download. VBA components posted on the website will be available for all languages that AutoCAD and industry-specific versions of AutoCAD support.

How can enterprise users deploy VBA?
VBA is currently not part of the AutoCAD install. Now that we are making VBA an additional component that needs to be downloaded and installed separately, we will be supplying users and CAD managers with a script to deploy VBA. This script can be downloaded from the product support page.

What are the options for users who what to migrate to VB.NET?
We are developing a migration guide, including extensive code samples, to help you through this multiyear code migration. Users can start learning VB .NET and migrating their VBA applications today using Microsoft’s free Visual Basic Express.

What is Microsoft’s position on VBA technology?
See the Microsoft Visual Basic for Applications web page for more information on this subject.

What is Visual Studio Tools for Applications (VSTA)?
Microsoft® Visual Studio® Tools for Applications (VSTA) is a powerful customization toolset that supports development with VB and C#. Built on Visual Studio and the .NET Framework, Visual Studio Tools for Applications makes it easier to write reliable, robust, and secure customizations by providing managed extensibility for both COM and .NET applications.

What is Visual Basic Express?
Visual Basic Express is a free streamlined version of Microsoft’s Visual Studio specifically designed for VB .NET application development. Visual Basic Express enables you to use the same underlying Autodesk COM APIs as VBA did as well as the more powerful .NET API . Use of Visual Basic Express will require modifications to your existing VBA code because there are significant language and code structure differences between VBA and Visual Basic Express’ VB .NET.

How long will VBA continue to be supported in AutoCAD?
Autodesk is evaluating how long VBA will be supported in Autodesk products in the future. Though supported in the AutoCAD 2010-based products, it may or may not be supported in future releases. Autodesk recommends VB developers develop all new code with VB .NET.

What should a developer using VBA today do moving forward?
To eliminate uncertainty, we strongly recommend VBA users transition to VB .NET as soon as reasonably possible. Developers who want to avoid purchasing a license of Microsoft Visual Studio to do Visual Basic development are encouraged to use Microsoft’s free Visual Basic Express. Autodesk will be publishing a white paper on using the Visual Basic Express with AutoCAD-based products in the near future. 

Does this change affect any other AutoCAD APIs, such as COM?
No. This just affects VBA.

Can I use the VBA Automation in Microsoft Office applications such as Excel to access AutoCAD objects?
Yes. This will work without the VBA module installed. Accessing AutoCAD objects through COM and .NET APIs will continue to work.

With VSTA, is it possible to program in C# or only in Visual Basic (VB)?
With VSTA, you can program in both C# and Visual Basic (VB).

Will Autodesk be providing any .NET documentation to help with adoption of VSTA?
Yes, we will be providing a developer’s guide in the near future to assist with your move to VSTA. Please visit this site or the Autodesk Developer Network site for availability of this documentation.

If I want to migrate my VBA code to VSTA, what code can be migrated? Are there any resources I can use?
Due to significant differences in language syntax and structure, significant amounts of VBA code will need to be rewritten for VB .NET.

You can learn more about moving AutoCAD VBA applications to VB .NET through an Autodesk University 2008 class recording VBA to VB .NET Migration (courtesy of and thanks to Jerry Winter).

Will the VBA be improved upon in the future?
VBA has not had significant improvements since AutoCAD 2000, and there are no plans to change it in the future.

How does it work to use VBA outside of AutoCAD, such as for a user having code in Excel? Does VBA for AutoCAD needed to be installed?
No. If a user is running macros in Microsoft Excel that access the AutoCAD COM Automation API, then these macros will continue to work and do not require that the AutoCAD VBA module to be installed.