in Access 2003 - Trust access to Visual Basic Project greyed out how do i enable it?

Posted on 2008-06-23
Medium Priority
Last Modified: 2011-10-19
We have a programmer that needs that option checked but it is greyed (ghosted, disabled) and cannot be changed.
If we go to Excel or Word that option can be enabled or disabled by a click.  Unfortunately, we cannot enable it.
Also, in Access, Excel and Word the Macro Security is set to Low.
I have changed the Macro Sercurity in Access to High then it prompts me to restart the program I do, then change it back to Low and restart and still no option to check the box.
Any ideas?
Question by:drewmorris
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 21850989
I'm not positive but it may be the same setup as Excel. Here are my notes for the same option in Excel:

Excel provides an option in the registry to allow programmatic access to VBA projects. The option is set on the Trusted Publishers tab of the Security dialog (Tools->Macros->Security). The option is stored in one of two places:


The registry key value of the option is 0 (don't allow access) or 1 (allow access). The key in the Local Machine hive has precedence and, if present, disables the option check box. If both keys are missing then the value of the option is off (don't allow access).


Author Comment

ID: 21852133
Re: Access I had no such entries in either location.
Re:Excel I had the security Entry in:

I created the exact same entry under Access\Security\AccessVBOM with the DWord Hexadecimal 1 (just like the setting for Excel) and still am not able to check the box.
I have attahced 4 jpgs, 1 Excel Registry Security, 1 Access Registry Security, 1 Excel  Macro Security and 1) Access Macro Security
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 21853080
I've done some more research and I believe that that option is not used in Access. What you are probably looking at is a generic dialog used by all Office products and, for Access, that option is just disabled. The fact that I can't find the option at all in Access 2007 supports that theory. It makes sense when you consider that Access databases are not tossed around like Word and Excel documents. For fun I tried to figure out where Word stores that setting and I got absolutely nowhere.

So the next question is: why does your programmer need to access that setting? Is there something the programmer is trying to do that is blocked?

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.


Author Comment

ID: 21857770
I am waiting for a response from him but it is in Word 2003 as well as 2007 and Excel 2003 and 2007.
I do not see it in Access 2007

Author Comment

ID: 21857792
Also, the option is available in Access 2000 and he is able to check it or uncheck.  

from the programmer:
    I found the cause of the problem I am having in  Access 2003 which is 'not being able to save any code changes to Visual Basic'. I use two commands in my code ('kill' and 'shell') and have since the beginning of time. Access 2003 has labeled these commands as 'dangerous' and will not allow them unless the option box 'Trust access to Visual Basic Project' is checked. I found an alternative to 'kill' that works just fine to remove temporary files. The 'shell' command enables Access to execute applications written in VB6 such as the Bulletin and Recap reports. Here are basically the steps I need to do to check this box.

Author Comment

ID: 21858308

I have code in my Access 2003 application that executes a VB6 application. To do this I am using the 'shell' method:
    stAppName = "C:\Program Files\IssueBullPreview\IssueBullPreview.exe "
    Call Shell(stAppName, 1)
    When I make any change to the Access application, even inserting a space anywhere, the 'save' command errs out and I get a message to 'send this to Microsoft'. In researching the problem, I find that Access 2003 has labeled the 'shell' technique as 'dangerous'. However I am led to believe that many programmers are using 'shell' to execute external programs with no problem.
    This technique has been an integral part of the extract process since day 1. there is no problem using the application. Everything processes just fine. I just cannot do any maintenance on it. My workaround is to download the application and do the maint on Access 2000 and then upload the database when finished.
     I 'commented out' all the shell statements (as a test) and I was able to change anything I wanted and it 'saved' just fine in Access 2003.
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 21859407
Send this alternative solution for Shell to your programmer:

Option Explicit

Public Const SW_SHOWNORMAL = 1

Private Declare Function ShellExecute Lib "shell32.dll" Alias _
   "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
   ByVal lpFile As String, ByVal lpParameters As String, ByVal _
   lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Function LaunchApplicationHidden( _
      ByVal PathName As String _
   ) As Long
' Launch the requested application with it's main window hidden.
   LaunchApplicationHidden = ShellExecute(0&, vbNullString, PathName, vbNullString, vbNullString, SW_SHOWMINNOACTIVE)
End Function

Public Function OpenDocument( _
      ByVal PathName As String, _
      Optional ByVal Parameters As Variant _
   ) As Long

' Open the requested document.

   If IsMissing(Parameters) Then
      OpenDocument = ShellExecute(0&, vbNullString, PathName, vbNullString, vbNullString, SW_SHOWNORMAL)
      OpenDocument = ShellExecute(0&, vbNullString, PathName, CStr(Parameters), vbNullString, SW_SHOWNORMAL)
   End If
End Function


Author Comment

ID: 21859981
thanks Zorvek..I am waiting to hear back from him

Author Comment

ID: 21900613
Thanks for the info. I haven't been able to successfully implement it to date, but will continue to investigate it. It looks like putting this code in a module instead of a form may be the key. Another factor has arisen and that has to do with 'trusted publishers'. Do we have current digital signatures for Microsoft and Symantec?
---Any idea how I find out if we have current digital signatures for MS and Symantec?
LVL 81

Accepted Solution

zorvek (Kevin Jones) earned 2000 total points
ID: 21901550
I can't answer those questions but your IT department should be able to help. Here are my notes on creating a free digital certificate.

An unofficial digital certificate can be added to an Excel workbook so that, after a one time interaction with the user where the user either allows or disallows that digital certificate, the user can then repeatedly open the workbook and run macros without any warnings at all, even if their security setting is high. Note that a network administrator can lock the list of trusted sources and prevent a user from adding the certificate to the list rendering this technique ineffective. Also note that the user will not be able to run signed macros if the security setting is set to Very High (the Very High setting was introduced in Excel 2003.)
An extended description of how to create and use digital certificates can be found at http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=194. A brief tutorial is included below.

To create a free unsecured code-signing digital certificate locate and run SelfCert.exe. It is an optional utility installed as part of the Office installation found in the Office installation directory. If not found, open the Add/Remove Programs control panel, run the Office Installer, and install Digital Signature for VBA projects under Office Tools. When run SelfCert asks for a name - enter any meaningful name or description. The text entered is displayed to the user whenever they are asked to accept or decline the digital certificate. For more information see http://support.microsoft.com/default.aspx?scid=kb;en-us;Q217221.

Once the digital certificate has been created on the development system, open the workbook and press ALT+F11 to open the VBE. Select the menu command Tools->Digital Signature. Click Choose and select the desired digital certificate (they are listed by name.) Click OK. Click OK again. The workbook now contains a digital signature. Since the development system already has the digital signature installed, the workbook will now open on that system without any macro warning prompt.

To allow the workbook to run without the macro security warning on another system the digital certificate has to be installed on those systems as well. Copy the workbook to a target system and open it. Excel will present the Security Warning dialog. Click Details to show the Digital Signature Details dialog. Click View Certificate to show the Certificate dialog. Click Install Certificate. Click Next twice and then Finish. Click Yes when the prompt is displayed asking if the certificate should be installed. Click OK on the completion dialog. Click OK twice more to close the widows. Click Enable Macros on the Security Warning to open the workbook. The next time the workbook is opened the same security dialog will be displayed and the check box "Always trust macros from this publisher" will be enabled - check it on and click "Enable Macros". In the future any workbook with that digital certificate installed will open without a macro security warning.

A certificate can also be installed by sending just the certificate as a separate file. To create the certificate file, open the "Internet Options" control panel, navigate to the Content tab, click Certificates, select the certificate, click Export, click Next three times, click Browse and navigate to a known folder, enter a certificate file name, click Save, click Next, click Finish, click OK, click Close to close the Certificates dialog, and click OK to close the "Internet Options" control panel. The certificate file can be sent to anyone and, when opened, will display the Certificate dialog. Clicking "Install Certificate" leads the user through the same installation process described above. Once installed, all workbooks with that digital signature will open without any warnings.

Since it is relatively easy for someone to forge an unsecured digital certificate and place it in a malicious workbook, this method of avoiding macro security warnings may not be an acceptable solution. In the event that a decision is made to abandon this technique the installed digital certificates can be easily removed by opening the Internet Options dialog from either Internet Explorer or from the control panels and navigating to the Content tab. Click on Certificates. Find the certificates to be deleted (they should be in either the Trusted Root Certification Authorities or Other People section,) selecting them, and click the Remove command button. Click Done when finished.

If true security is required then a secure digital certificate can be purchased from any of the many Certificate Authorities. See Microsoft's list of Certificate Authorities at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsecure/html/rootcertprog.asp. Certificates are purchased for periods of time and average $500 per year.

For more information on macro security settings in Office, see http://office.microsoft.com/en-us/assistance/HA011362661033.aspx.


Author Closing Comment

ID: 31469968
Thanks for all the help!

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 23 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question