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

相关信息
Article ID: 40384
Software:
ArcGIS - ArcEditor 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10
ArcGIS - ArcInfo 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10
ArcGIS - ArcView 8.3, 9.0, 9.1, 9.2, 9.3, 9.3.1, 10
ArcGIS for Desktop Advanced 10.1
ArcGIS for Desktop Standard 10.1
Platforms:
Windows XP, Server 2003, Vista, Server 2008, Windows 7

问题描述
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:

已邀请:

EsriSupport

赞同来自:

解决方案


WARNING: 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.
  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. 


创建及修改时间
Created: 6/15/2012

Last Modified: 7/10/2013
原文链接
http://support.esri.com/en/kno ... 40384

要回复问题请先登录注册