Enable or disable Trust access to Visual Basic Project in Office apps

If you want to enable or disable Trust access to Visual Basic Project in Office apps, such as Word, Excel, PowerPoint, etc., you can do so with the help of the in-built option, Local Group Policy Editor, and Registry Editor.

What is Trust access to the VBA project model?

VBA Project Model helps users run various codes from any automation client. At times, you might need to do something in the Excel spreadsheet, and the corresponding option is not present. In such situations, you can use Visual Basic to get things done manually. Many times, such codes may not work correctly until or unless you turn on the Trust access to Visual Basic Project setting.

Note: In every instance, we have used Microsoft Excel for demonstrations. However, you can use Word or PowerPoint as well.

Enable or disable Trust access to Visual Basic Project in Office apps

To enable or disable Trust access to Visual Basic Project in Office apps, follow these steps:

  1. Open Microsoft Excel and click on Options.
  2. Switch to the Trust Center tab.
  3. Click the Trust Center Settings button.
  4. Go to the Macro Settings tab.
  5. Tick the Trust access to the VBA project object model checkbox.
  6. Click the OK button.

To know more about these steps, continue reading.

First, you need to open Microsoft Excel or Word or PowerPoint and click the Options visible in the bottom left corner. Then, switch to the Trust Center tab and click on the Trust Center Settings button.

Next, switch to the Macro Settings tab and tick the Trust access to the VBA project object model checkbox.

How to enable or disable Trust access to Visual Basic Project in Office apps

Click the OK button to save the change.

Enable or disable Trust access to Visual Basic Project using Group Policy

To enable or disable Trust access to Visual Basic Project using Group Policy, follow these steps:

  1. Press Win+R to open the Run prompt.
  2. Type gpedit.msc and click the OK button.
  3. Navigate to Trust Center in User Configuration.
  4. Double-click on the Trust access to Visual Basic Project setting.
  5. Choose the Enabled option.
  6. Click the OK button.

Let’s check out these steps in detail.

To get started, press Win+R to display the Run prompt, type gpedit.msc, and click the OK button to open the Local Group Policy Editor. Then, navigate to the following path:

Excel:

User Configuration > Administrative Templates > Microsoft Excel 2016 > Excel Options > Security > Trust Center

Word:

User Configuration > Administrative Templates > Microsoft Word 2016 > Word Options > Security > Trust Center

PowerPoint:

User Configuration > Administrative Templates > Microsoft PowerPoint 2016 > PowerPoint Options > Security > Trust Center

Double-click on the Trust access to Visual Basic Project setting and choose the Enabled option.

How to enable or disable Trust access to Visual Basic Project in Office apps

Alternatively, choose the Disabled option to turn it off.

Click the OK button to save the change.

Turn on or off Trust access to Visual Basic Project using Registry

To turn on or off Trust access to Visual Basic Project using Registry, follow these steps:

  1. Press Win+R > type regedit > hit the Enter button.
  2. Click the Yes option.
  3. Navigate to Microsoftoffice16.0 in HKCU.
  4. Right-click on 16.0 > New > Key and name it as excel.
  5. Right-click on excel > New > Key and name it as security.
  6. Right-click on security > New > DWORD (32-bit) Value.
  7. Set the name as accessvbom.
  8. Double-click on it to set the Value data as 1.
  9. Click the OK button and restart your PC.

To learn more about these steps, continue reading.

For getting started, press Win+R > type regedit and hit the Enter button. If the UAC prompt appears on your screen, click the Yes button.

Then, navigate to the following path:

HKEY_CURRENT_USERSoftwarePoliciesMicrosoftoffice16.0

Right-click on 16.0 > New > Key and name it as excel/word/powerpoint.

How to enable or disable Trust access to Visual Basic Project in Office apps

Repeat the same steps to create a sub-key named security. Then, right-click on security > New > DWORD (32-bit) Value and set the name as accessvbom.

How to enable or disable Trust access to Visual Basic Project in Office apps

Double-click on it to set the value data as 1.

How to enable or disable Trust access to Visual Basic Project in Office apps

Click the OK button and restart your PC. However, if you want to turn this feature off, you have two options. First, you can set the value data as 0 and restart your computer. Second, you can delete the REG_DWORD value and restart your computer.

How do I enable Trust access to the VBA project object model?

There are three different ways to enable Trust access to the VBA project object model, and all the methods are mentioned above. If you do not want to go through several options, you can use the in-built settings panel. On the other hand, you can use the Local Group Policy Editor and the Registry Editor to get it activated.

Read: How to enable or disable Live Preview in Word, Excel, PowerPoint

How do I enable a project in VBA?

To enable Trust access to Visual Basic Project in Excel, Word, or PowerPoint, you need to use the Trust Center Settings. Apart from that, you can use the GPEDIT and REGEDIT methods. In the Group Policy, open the Trust access to Visual Basic Project setting and choose the Enabled option.

Read: How to turn on or off File validation in Word, Excel, PowerPoint.

How to enable or disable Trust access to Visual Basic Project in Office apps

Source link

Alice AUSTIN

Alice AUSTIN is studying Cisco Systems Engineering. He has passion with both hardware and software and writes articles and reviews for many IT websites.

Leave a Reply