+ Reply to Thread
Results 1 to 7 of 7

How to enable "Trust access to the VBA project object model"?

  1. #1
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    How to enable "Trust access to the VBA project object model"?

    Hello



    The VBA Project is password protected and the "Trust access to the VBA project object model" is unticked.I somehow was able to go to VBE find the "MBAEssentials Password" programaticall
    Type my password programatically
    and unlock it programatically

    The problem comes when the Trust center settings options "Trust access to the VBA project object model" is not checked.
    ERROR MESSAGE: "Programatic access to Visual Basic Project is not trusted" How can I ticke this option programatically?

    Please note that "I know my VBProject Password" and I am not asking for breaking password.

    My other observation:
    If I first open a brand new workbook and go to its option and tick the "Trust access to the VBA project object model" option and close that instance without saving ,opening my original workbook and run the code for unlocking VBProject programaticaly it works fine.means the change in the settings of an irrelavent workbook is effective for my original workbook.
    How can I manuplate this or any other way for that

    Best Regards
    Imran Bhatti
    Teach me Excel VBA

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to enable "Trust access to the VBA project object model"?

    How can I ticke this option programatically
    You can't. It's a security measure otherwise code could change it for malicious purposes.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to enable "Trust access to the VBA project object model"?

    Hi,

    It's just a registry key, which you can write to if the user has the appropriate permissions. The main issue is that you need to restart Excel in order for the change to take effect, and that is not quite so simple. I'm also unsure as to whether or not further discussion of this would constitute a violation of forum rules.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to enable "Trust access to the VBA project object model"?

    constitute a violation of forum rules
    Bordering on... IMO.

    As mentioned:
    ...regarding breaking or bypassing any security measure

  5. #5
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: How to enable "Trust access to the VBA project object model"?

    That was my opinion too, which is why I didn't give any further details.

  6. #6
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to enable "Trust access to the VBA project object model"?

    Like minds, then...

  7. #7
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,785

    Re: How to enable "Trust access to the VBA project object model"?

    me halt too. ...

    I "ImranBhatti" make a solemn pledge that I will abide by the forum rules.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Is it a BAD idea to enable "Trust access to the VBA project object model"
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-23-2015, 12:26 PM
  2. Replies: 4
    Last Post: 05-30-2014, 09:06 PM
  3. Replies: 6
    Last Post: 07-30-2013, 11:48 AM
  4. Activate check "Trust access to Visual Basic " in Excel
    By Pablo via OfficeKB.com in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-23-2005, 12:05 PM
  5. [SOLVED] "Excel.Application" Object Model
    By Shaker in forum Excel General
    Replies: 2
    Last Post: 01-09-2005, 07:07 AM
  6. [SOLVED] "Excel.Application" Object Model
    By Shaker in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-09-2005, 07:07 AM
  7. "Excel.Application" Object Model
    By Shaker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2005, 07:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1