Problem: A VBA initialization failed error occurs when launching ArcGIS for Desktop 10.x
A "VBA initialization failed" error occurs when launching ArcGIS for Desktop 10.1 or 10.2 (ArcMap or ArcCatalog). This issue persists even after uninstalling and reinstalling the VBA Compatibility runtime files.
Support for VBA (Visual Basic for Applications) has been deprecated in ArcGIS for Desktop 10.1, however users are still able to run existing VBA applications by installing the VBA Compatibility setup program. This installs only the necessary VBA runtime files required without the developer tools. Existing VBA applications may fail due to the following reasons:
• Incorrect VBA Compatibility version installed.
• VBA Compatibility does not load on startup.
Solution or Workaround
- Solution A
1. Uninstall the 10.1 VBA Compatibility runtime files.
2. Locate and Install the 10.2 VBA Compatibility setup program in the '\ArcGIS_VBA' folder from the installation media or download folder, or select the ArcGIS for Desktop VBA Compatibility link on the ArcGIS for Desktop startup menu.
3. Once install, obtain the authorization file for VBA.
The VBA Compatibility setup from 10.2.1 is compatible with ArcGIS for Desktop 10.2.2
- Solution B
Warning: The given instructions include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary.
Esri cannot guarantee results from incorrect modifications while following these instructions. Therefore, use caution and proceed at your own risk.
Administrative rights are required.
Configure the ArcMap and ArcCatalog registry settings as per the instructions below.
1. Launch the Registry Editor from the Desktop by typing in 'regedit.exe' in the Windows Start menu search box.
2. Navigate to the following registry keys to make changes:
• 64-bit Systems• 32-bit Systems
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ESRI\Desktop10.1\ArcCatalog\Settings3. Change the Value data for PreloadVBA to '1' for both ArcMap and ArcCatalog.
HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\Desktop10.1\ArcCatalog\Settings4. Close Registry Editor and restart the machine.
If the PreloadVBA has a value of '0', VBA is not loaded (disabled) when ArcMap starts. If the PreloadVBA has a value of '1', VBA is loaded (enabled) when ArcMap starts.