To Load or Unload a VBA Project

Note: Starting with AutoCAD 2014-based products, custom applications must work under secure mode; when the SECURELOAD system variable is set to 1 or 2. When operating under secure mode, the program is restricted to loading and executing files that contain code from trusted locations; trusted locations are specified by the TRUSTEDPATHS system variable. For more information, see About Protecting Against Malicious Code.

To Load a VBA Project

  1. At the Command prompt, type vbaman and press Enter.
  2. In the VBA Manager dialog box, click Load.
  3. In the Open VBA Project dialog box, browse to and select the DVB file to load. Click Open.
  4. In the message box, click Enable Macros.
  5. Click Close.

To Unload a VBA Project

  1. At the Command prompt, type vbaman and press Enter.
  2. In the VBA Manager dialog box, select the VBA project you want to unload. Click Unload.
  3. Click Close.

To Automatically Load a VBA Project and Run a Macro at Startup

  1. Save a VBA project with the file name acad.dvb and place it in one of the product's support file search paths.
  2. In the VBA project, create a macro named AcadStartup and add the code you want executed at startup.
  3. Note: Each time you start a new drawing session, the program searches for the acad.dvb file and loads it.

To Load a VBA Project with AutoLISP