ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Enabling Turst access to Visual Basic Projects (https://www.excelbanter.com/excel-programming/413498-enabling-turst-access-visual-basic-projects.html)

Sam J

Enabling Turst access to Visual Basic Projects
 
Hi Is it some how possible to Enable Turst access to Visual Basic Projects
from a VBA Code.

[email protected]

Enabling Turst access to Visual Basic Projects
 
Hi
No, and a good thing too don't you think!?
regards
Paul

On Jul 3, 9:26*am, Sam J <Sam wrote:
Hi Is it some how possible to Enable Turst access to Visual Basic Projects
from a VBA Code.



Bob Phillips[_3_]

Enabling Turst access to Visual Basic Projects
 
No, the best you can do is to test if it is set.

--
__________________________________
HTH

Bob

"Sam J" <Sam wrote in message
...
Hi Is it some how possible to Enable Turst access to Visual Basic Projects
from a VBA Code.




Andym

Enabling Turst access to Visual Basic Projects
 
It is possible to Enable Trust to Visual Basic Project from VBA code.

It can be modifed through regedit.exe. It is called AccessVBOM, which can
also be modified through VBA code. However, closing Excel will set the
AccessVBOM value back to the level that is indicated in the "Trust access to
Visual Basic Project" checkbox.

One option is to change the AccessVBOM value within a vbScript so Excel
doesn't need to be open. If you need this done within VBA, the only option I
can think of is the following:
-VBA code closes workbook
-On workbook close, vbScript is called
-vbScript waits until all Excel apps are closed, changes AccessVBOM value,
then re-opens your Excel workbook

The code to change the AccessVBOM value is available on several forums, just
try searching for it.

"Sam J" wrote:

Hi Is it some how possible to Enable Turst access to Visual Basic Projects
from a VBA Code.



All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com