Article ID: 282033 - Last Review: January 29, 2007 - Revision: 2.3

XL2002: Error Message: Run-Time Error '1004': Programmatic Access to the Visual Basic Project Is Not Trusted

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
This article was previously published under Q282033
Expand all | Collapse all

SYMPTOMS

When you run code that uses the Microsoft Microsoft Visual Basic for Applications Extensibility 5.3 Library, you may receive the following error message:
Run-time error '1004': Programmatic access to the Visual Basic Project is not trusted

CAUSE

Microsoft Excel 2002 contains a new security feature that allows you to choose whether or not programmatic access to the Visual Basic project should be trusted.

The default setting is to not trust programmatic access to the Visual Basic project.

RESOLUTION

To allow programmatic access to the Visual Basic project, follow these steps:
  1. On the Tools menu, point to Macro and then click Security.
  2. In the Security dialog box, click the Trusted Sources tab.
  3. Click to select the Trust access to Visual Basic Project check box.

APPLIES TO
  • Microsoft Excel 2002 Standard Edition
Keywords: 
kberrmsg kbprb KB282033