How To: Export code modules from VBA


You can use the Visual Basic for Applications (VBA) editor to write VBA code that you can execute from within ArcMap or ArcCatalog. This code is stored inside the Normal.mxt file (for ArcMap) or the Normal.gxt file (for ArcCatalog). You can export your code to Visual Basic modules, which you can import into other Visual Basic or VBA projects.


  1. In the Project window in the VBA editor, click the module you want to export.
  2. Click File, then click Export File.
    [O-Image] Export VBA module
  3. Navigate to the folder where you want to store the Visual Basic Module and click Save.