New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Trust Access to Visual Basic Project

Free Excel Tips and Tutorials

Trust Access to Visual Basic Project

Postby Sisyphus » Tue Feb 28, 2012 10:08 pm

You will find a checkbox with the captioned purpose at the very bottom of the 'Trusted Publishers' tab accessible from Tools/Macro/Security ... It is a tricky decision to make.

The 'Visual Basic Project' object comprises of that part of your document (Excel, Word or other Office application) that contains VB code. Every document has such a space. If there is no code it is empty. Once you add code, that is where it is kept.

If you are allowed access to this object you can write code in another (or the same) project to modify existing code or add more. One frequent use is to create a user form on the fly, add textboxes to it, and thereby create a dynamic interface which adjusts to the requirements of the moment. Wonderful! On the other hand, if the checkbox is set to deny such access the only way to change the code is to open the VBE window and do it there.

The setting applies to all applications and you can't set this checkbox programmatically. The only way to enable this trust is to click the checkbox "manually". Why did Microsoft make life so difficult for innocent programmers like you and me?

Well, not all programmers are like you and me and not all programmers are innocent. If you can get at the VB Project so can any intruder you didn't invite into your computer. For example, he could add code in your project that installs a virus anywhere in your system and then deletes itself - the very technology used when you receive that e-mail asking you to 'click here to view your airline ticket and please advise if you need a receipt for your payment which was received with thanks'.

Just the same if not worse, by the way, as working on your computer with Administrator rights which ensures that any busy spider passing by isn't hampered in accessing your computer's innermost secrets by lack of privileges. ;)

Access to Visual Basic Project should NOT be granted permanently. Allow it as and when you must but don't forget to disable it again before you go home. If you have programs that require the access make sure that you sit behind a strong and trustworth firewall. And if you intend to write programs that require access to the VB Project you may consider whether such a firewall exists where they will be deployed.
Have a great day! :D

Sisyphus
I do this for "honour and country" - much less of the latter, actually.
If I helped you, award points, plenty of them.
If I bored you, deduct points for being too long-winded. (I know, :lol)
Sisyphus
Former Moderator
 
Posts: 4454
Joined: Dec 7, 2011
Location: Shanghai
Reputation: 203
Excel Version: 2010

Return to Excel Tips and Tutorials

Who is online

Users browsing this forum: No registered users and 20 guests