VBA support for AutoCAD

Autodesk Support

May 9, 2024


Products and versions covered


Issue:

AutoCAD support for VBA (Visual Basic for Applications) and how to download it.

Solution:

VBA 7.1 is supported in Autodesk products, but it is no longer part of the default AutoCAD installation and must be downloaded and installed separately. If you utilize VBA macros in your work environment, they will no longer work unless the VBA module is installed on your system. When you run a command that requires VBA, a message will be displayed stating that VBA is no longer installed with AutoCAD and directing you to a website where you can download the VBA module.

NOTES:

VBA components posted on this website are available for all languages that AutoCAD and industry-specific versions of AutoCAD support.
VBA Manager and Enabler are part of the VBA module.

Deploying VBA

To deploy the VBA download in an enterprise environment, you must download and extract the VBA Enabler and then run the following script:

' <script_begin>----------------------------------------------------------------

' Scripted installation for VBA Enabler

option explicit

 

' define variables

dim shell

dim productType

dim strInstallLevel

dim strSourcePath

 

' Script initialization

Set shell = CreateObject("WScript.Shell")

 

productType = "BonusPack"

strInstallLevel=5 ' 5 installs everything, 3 installs typical

'

' Source to install from (e.g. Z:\install\Autodesk\ AcVbaInstallerInstall \CDROM1)

strSourcePath = "C:\Autodesk\AutoCAD_2010_VBA_Enabler_Install_Image\CDROM1"

'

RunStandaloneInstall()

Wscript.quit()

 

'

Function RunStandaloneInstall

shell.run DefaultCommand(),2,1

end function

'

Function DefaultCommand

dim retString

' /q for silent install ' /c [key] override parameters for the key

retString = """" & strSourcePath & "\setup.exe " & """" & " /t /q /c " & productType & ": "

retString = retString & "InstallLevel=" & strInstallLevel

DefaultCommand = retString

end function

'

 

' </script_end>----------------------------------------------------------------

 

 

Products:

AutoCAD;


Was this information helpful?


Need help? Ask the Autodesk Assistant!

The Assistant can help you find answers or contact an agent.


What level of support do you have?

Different subscription plans provide distinct categories of support. Find out the level of support for your plan.

View levels of support