VBA & Macro Problems

How to Find Trust Access to the VBA Project Object Model in Microsoft 365

Steve KSteve K Oct 28, 2026 869 views

Question details

The user needs to find and enable the setting to trust access to the VBA project object model to allow Access VBA to edit Excel VBA modules.

How to Enable Trust Access to the VBA Project Object Model in Microsoft 365
Product
Microsoft 365 (Access and Excel)
Device & OS
not provided
Scenario
Attempting to use Access VBA to programmatically create and modify Excel VBA modules.
Observed behavior
The required trust setting cannot be located within the Microsoft Access or Outlook interfaces, preventing the VBA code from successfully executing.
Before you start

Ensure you have administrative privileges to modify Microsoft Office Trust Center configurations and confirm that your local database folder is added to your trusted locations.

Solution 1Recommended

Enable the VBA Object Model Setting in Excel

Because you are modifying Excel's object model, the permission must be granted in Excel's Trust Center, rather than in Microsoft Access.

The 'Trust access to the VBA project object model' setting is application-specific. When Access VBA controls Excel, it interacts with the Excel object model. Therefore, Excel acts as the host application for those modules and must explicitly grant permission for its VBA project to be modified.

1
Launch Microsoft Excel

Open the Microsoft Excel application on your computer. You do not need to open a specific workbook; the blank startup screen is sufficient.

2
Access Excel Options

Click on the 'File' tab in the top-left corner of the ribbon, then click 'Options' situated at the bottom of the left-hand navigation pane.

3
Open Trust Center

In the Excel Options dialog box, select 'Trust Center' from the left sidebar, and then click the 'Trust Center Settings' button on the right side.

4
Modify Macro Settings

Navigate to 'Macro Settings' in the left pane of the Trust Center window. Check the box labeled 'Trust access to the VBA project object model' and click 'OK' to apply the changes.

Enable the VBA Object Model Setting in Excel
Configuration Complete: Once enabled in Excel, your Access VBA scripts will have the necessary permissions to create and edit Excel VBA modules without encountering object model restriction errors.

Manage Macros and VBA Securely with WPS Spreadsheets

WPS Office provides built-in support for VBA and macros, offering a highly compatible and streamlined interface to manage your macro security and developer tools efficiently.

  1. 1. Open WPS Spreadsheets: Launch WPS Office and open your macro-enabled spreadsheet.
  2. 2. Access Developer Tools: Navigate to the 'Developer' tab located in the top ribbon menu to access VBA features.
  3. 3. Adjust Macro Security: Click the 'Macro Security' button in the toolbar to configure your trust settings and safely enable VBA execution.
Seamless execution of Excel VBA macrosFully compatible with Microsoft Excel macro-enabled formats (.xlsm)Lightweight software architecture with fast loading speedsBuilt-in developer tools and dedicated VBA editor
microsoft office alternative - wps office

Frequently Asked Questions

Why is the Trust Access to the VBA project object model missing in Microsoft Access?

Microsoft Access does not include this setting because the VBA project object model protection is designed for document-centric applications like Excel and Word. Access handles its database security differently, so the setting only exists in the target application (Excel) you are trying to automate.

Is it safe to enable trust access to the VBA project object model?

Enabling this setting introduces a security risk because it allows code to write, modify, or delete other macros. You should only enable it if you explicitly trust the automation scripts (such as your own Access database code) running on your machine.

Does this setting apply to all Excel workbooks?

Yes. The 'Trust access to the VBA project object model' is a global, application-level setting. Once checked, it applies to every Excel workbook opened on that computer until it is manually disabled in the Trust Center.

Do I need to change this setting in Outlook to run Outlook VBA?

No. Outlook does not expose its VBA project object model to programmatic access from external applications in the same way Excel and Word do. Consequently, this specific trust setting does not exist in Outlook's Trust Center.