How To: Ensure that a prompt is displayed when opening an MXD in ArcMap prior to executing embedded VBA


The instructions provided describe how to modify the default security setting of ArcMap to ensure that a prompt is displayed to allow the user to decide whether or not to enable the execution of VBA macros in a particular map document. This change only affects the user who is currently logged into the machine.

In both ArcGIS 10.0 and 10.1 VBA is an optional install. If VBA has not been installed and licensed, no special action is required to prevent VBA content in existing MXDs from being run. If a document containing VBA code is opened and VBA is not fully installed, the following warning message appears:



The instructions below 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.

The steps below allow users to modify the behavior of ArcMap to either prompt prior to executing embedded VBA or to disable VBA entirely.
  1. In Windows, click Start > Run.
  2. In the Run window, type regedit. In the Registry Editor window, navigate to HKEY_CURRENT_USER > Software > ESRI > Desktop 10.x > ArcMap > Settings.
    For ArcGIS 9.x, the location is HKCU\Software\ESRI\ArcMap\Settings.
  3. Select Edit > New > DWORD (32bit) Value and name it VBASecurityLevel.
    • Setting a value of 2 ensures that a prompt is displayed that allows users to decide whether or not they would like to execute embedded VBA each time ArcMap launches.
    • Setting a value of 3 disables VBA entirely.