Lock VBA customizations to ArcMap and ArcCatalog


The method described in this document restricts access to the normal.mxt and normal.gxt files that contain customizations for ArcMap and ArcCatalog. These files are created from scratch in a user's Winnt\Profiles\<username>\Application Data\ESRI folder.

There is no way to control the contents of the Normal.* files, if they are not preexisting. However; however, if the files exist, their permissions can be modified to prevent other users from changing customizations.


  1. Log in as the system administrator, and start ArcMap and ArcCatalog. This will create the following files:

    c:\Winnt\Profiles\<username>\Application Data\ESRI\ArcMap\templates\Normal.mxt

    :\Winnt\Profiles\<username>\Application Data\ESRI\ArcCatalog\Normal.gxt

    where <username> is the name of the administrator.

  2. Open ArcMap's Visual Basic Editor.

    In ArcMap, select Tools > Macros > Visual Basic Editor.

  3. In the VBA project explorer window, expand Normal.mxt to expose ThisDocument and open its code window.
  4. Select MxDocument from the Object dropdown list, and NewDocument from the Procedure dropdown list in the code window.
    [O-Image] Select New Document from This Document Code Window
  5. Add this code to the NewDocument procedure:
    LockCustomization "<password>"

    where <password> is the desired password needed to make interface customizations.

  6. Add the same code to an OpenDocument procedure, which is also found in the Procedures dropdown list.

  7. Save Normal.mxt while in VBA, exit VBA, and exit ArcMap.

  8. Open ArcCatalog's Visual Basic Editor.

    In ArcCatalog, select Tools > Macros > Visual Basic Editor.

  9. In the project explorer window, expand Normal.gxt to expose ThisDocument and open its code window.

  10. At the top of the code window, select GxDocument from the Object dropdown list and OpenDocument from the procedure dropdown list.

  11. Add the same code to the GxDocument_OpenDocument procedure as in Step 5.

  12. Save the changes in VBA, exit VBA, and exit ArcCatalog.

  13. In Windows Explorer (the file browser), navigate to the administrative login account's:
    c:\Winnt\Profiles\<username>\Application Data\ESRI\ArcMap\templates\Normal.mxt

    Set the permissions for Everyone to Read Only.

  14. Navigate to the administrative login account's:
    c:\Winnt\Profiles\<username>\Application Data\ESRI\ArcCatalog\Normal.gxt

    Set the permissions for Everyone to Read Only.

  15. As the administrative account, copy the Normal.mxt and Normal.gxt to each user's directories:
    c:\Winnt\Profiles\<username>\Application Data\ESRI\ArcMap\templates

    c:\Winnt\Profiles\<username>\Application Data\ESRI\ArcCatalog

  16. After copying these files, be sure the ownership still indicates the administrator as owner and everyone else has only read access to these files.

    Anyone with administrative privileges will be able to delete these modified files. If they do, then the next time they start ArcMap or ArcCatalog, new versions of these files will be created and they won't lock customization.
    It may be necessary to have one account that owns and has full control of these files, that way, other administrators will not have access to the files.

    This methodology has not been tested or certified by the normal ESRI development procedures, so there may be unknown problems as a result of limiting permissions on these files. Users who choose to implement this locking methodology should experiment with it in a test environment before trying to implement it in any production environment.

Article ID:000002688

  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic