Error Accessing The System Registry

As the resident Excel expert at work, I have the privilege of being landed with some weird and wonderful errors which have to be fixed. Last week I developed an Excel spreadsheet for a user but when he went to test it he said he was getting an error when he tried to check the project references. Specifically when he went to Tools > References in the VBA IDE he got the message ‘Error accessing the system registry’:

ErrorAccessingTheSystemRegistry

This error had nothing to do with the spreadsheet I’d built for him: obviously he hadn’t tried to reach the project references menu for a little while. When you try to pull up the project references, Excel goes off and reads a bunch of keys from the registry and this error occurs when the you don’t have permission to read one or more of those keys. But how do you figure out which keys are causing the problem?

The answer is to run Process Monitor (which must be run under an admin account) because it will show you every key which Excel tries to read and whether it did so successfully. ProcMon has saved my bacon several times over the years so it’s worth a look if you haven’t come across it before.

It’s extremely easy to use: simply add a Process Name filter for EXCEL.EXE, clear the display and then, with Excel running under the user’s account, go to Tools > References and watch ProcMon burst into a flurry of activity. Once it’s calmed down you can stop capturing events and examine the output. You’re interested in any results which are ACCESS DENIED so add another filter on the Result column. In this case I have one key, HKCR\TypeLib\{57A0E746-3863-4D20-A811-950C84F1DB9B},  which is causing the problem:

procmon

A quick Google search on that key reveals it pertains to a Flash Player update which has affected a number of people. The VBA IDE error message will go away once the admin uses the Registry Editor to grant the user read access to the access denied keys listed by Process Monitor.

Advertisements

About Colin Legg

RAD Developer Microsoft MVP - Excel 2009 - 2014
This entry was posted in Microsoft Excel and tagged , , , . Bookmark the permalink.

2 Responses to Error Accessing The System Registry

  1. Peter Fisher says:

    Finally an answer that works, thankyou.

    Like

  2. Pingback: Excel VBA – Error Accessing The System Registry | Pete's Windows, Office, VB & SQL Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s