vl-vbarun (AutoLISP)

Runs a VBA macro

Supported Platforms: Windows only

Signature

(vl-vbarun macroname)
macroname

Type: String

Name of a macro in a loaded VBA project.

Return Values

Type: String or error

The value of the macroname argument; otherwise, an error occurs.

Examples

Load a VBA project file:

(vl-vbaload "c:/program files/<AutoCAD installation directory>/sample/vba/drawline.dvb")
"c:\\program files\\<AutoCAD installation directory>\\sample\\vba\\drawline.dvb"

Run a macro from the loaded project:

(vl-vbarun "drawline")
"drawline"