Trust access to the vba project object model

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,672
Office Version
  1. 365
Platform
  1. Windows
Hi

I am reading about macro settings and found this link about the option

[] trust access to the vba project

Mine is not check and I ran many small macros without problem so far. I read what is explained below but did not understand it well. Could you please explain to me why I need this option. Thank you very much.

https://bettersolutions.com/vba/macros/macro-settings.htm


trustcenter-macrosettings.png


Trust access to the VBA project object model (Default is off) This setting is for developers and is used to allow programmatic access to the VBA object model from any Automation client. For any Automation client to be able to access the VBA object model programmatically, the user running the code must explicitly grant access. This option was available in 2003 and has not changed.
All macros in trusted locations are allowed to run regardless of your macro security setting.
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
12,979
Office Version
  1. 2013
Platform
  1. Windows
Checking the box will give the user access to the Developer tools of VBA which allows macros to be written, help files to be accessed, etc. You might have been able to run macros without the block checked but you did not have full access to the Developer tools.
 

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,672
Office Version
  1. 365
Platform
  1. Windows
Thank you very much. I checked that box. I went to vba. I did not see any change in the menu, or anywhere else. So not sure what that box added to my environment? Thank you again
 

Kyle123

Well-known Member
Joined
Jan 24, 2012
Messages
2,711
You don't get extra options by checking that box and it's off by default for a reason.

You only need to to enable it if you are writing code to change code in the IDE, which for 99% of things is a bad idea
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,571
Office Version
  1. 365
Platform
  1. Windows
I would recommend leaving it unchecked, otherwise you are increasing the chance of getting bitten by something nasty.
For instance, I could write a macro that would delete all the code in your Personal.xlsb & then save it, now if you leave the "Trust access to the VBA project object model" unchecked then the code would not work, otherwise it will.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,463
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
It basically just allows your code to access the VBProject object and its properties/methods. It doesn't really have anything to do with the Developer tab or any additional menus in the VB Editor.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,616
Messages
5,625,880
Members
416,141
Latest member
Bartek9q

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top