ArcObjects Library Reference (Framework)  

IVbaApplication Interface

Provides access to members that modify the VBA projects in this application.

Product Availability

Available with ArcGIS Desktop.

When To Use

The IVbaApplication interface allows you to programmatically insert, remove, and run VBA code without actually opening the Visual Basic Editor. This interface has methods to create a new module, insert code into a specific module, remove a module, and run and macro.

Members

Description
Method CreateCodeModule Creates a code module in the specified VBA project.
Method InsertCode Inserts code into the specified module.
Method RemoveCodeModule Removes a code module from the specified VBA project.
Method RunVBAMacro Runs the specified VBA macro.

CoClasses that implement IVbaApplication

CoClasses and Classes Description
Application (esriArcCatalog) Esri ArcCatalog Application.
Application (esriArcGlobe) Esri ArcGlobe Application.
Application (esriArcMap) Esri ArcMap Application
Application (esriArcScene) The 3D Modeling Application.

Remarks

The Application object implements the IVbaApplication interface.