Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Keywords: KB282033, kbprb, kberrmsg

↑ Back to the top

Article Info
Article ID : 282033
Revision : 5
Created on : 1/29/2007
Published on : 1/29/2007
Exists online : False
Views : 281