Trust access to the vba project object model

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
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.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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
Back
Top