Date: 19/04/2013 01:41:00
From: KJW
ID: 297234
Subject: "Error accessing the system registry" in Office VBA Editor

I’ve encountered a problem in the VBA editor of my Office applications. When I select Tools > References, I get “Error accessing the system registry”. I don’t know how long this error has existed because I rarely look at Tools > Reference. The problem is in the standard user account that I usually use, but not in the administrators account that I rarely use. However, I tried creating a new standard user account, but the error occurs there as well. I’m running Office 2010 in Windows 7 on a PC that’s about six months old. There doesn’t seem to be any other problem with the system (although a few days ago, I did have some sort of hiccup that seemed to be about the video card, and this was while Excel was in use, but I doubt it’s related).

Reply Quote

Date: 19/04/2013 01:46:16
From: KJW
ID: 297236
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


Windows 7

64-bit version.

I can’t specifically recall ever looking a Tools > References on this system (the last time may have been on my old system more than six months ago).

Reply Quote

Date: 19/04/2013 07:50:00
From: poikilotherm
ID: 297247
Subject: re: "Error accessing the system registry" in Office VBA Editor

If you can access it through the admin log in, then it’s probably something to do with the permissions set up for user accounts. Try adjusting the permissions of the user accounts through the admin account…

Reply Quote

Date: 19/04/2013 08:18:40
From: The Rev Dodgson
ID: 297249
Subject: re: "Error accessing the system registry" in Office VBA Editor

I haven’t had that problem, but I always run from an account with admin rights.

I’ll have a look with a non-admin account and let you know.

Reply Quote

Date: 19/04/2013 08:40:40
From: The Rev Dodgson
ID: 297254
Subject: re: "Error accessing the system registry" in Office VBA Editor

Just logged on with a guest account, and had no problem accessing Tools References.

Reply Quote

Date: 19/04/2013 11:33:35
From: PM 2Ring
ID: 297313
Subject: re: "Error accessing the system registry" in Office VBA Editor

I don’t know much about Windows or VBA, but this looks like a similar error. I assume you aren’t running Crystal Reports, but I guess that the repair suggestion ought to work.

But I’d be tempted to run ccleaner first – it’s pretty good at cleaning up minor registry stuff.

Reply Quote

Date: 19/04/2013 14:08:00
From: KJW
ID: 297383
Subject: re: "Error accessing the system registry" in Office VBA Editor

The Rev Dodgson said:


I haven’t had that problem, but I always run from an account with admin rights.

I’ll have a look with a non-admin account and let you know.

It isn’t account permissions because I also tried creating a new administrators account and it failed there also.

Reply Quote

Date: 19/04/2013 14:11:00
From: poikilotherm
ID: 297387
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


The Rev Dodgson said:

I haven’t had that problem, but I always run from an account with admin rights.

I’ll have a look with a non-admin account and let you know.

It isn’t account permissions because I also tried creating a new administrators account and it failed there also.

Re-install Office or use ccleaner?

Reply Quote

Date: 19/04/2013 14:23:22
From: KJW
ID: 297393
Subject: re: "Error accessing the system registry" in Office VBA Editor

PM 2Ring said:


I don’t know much about Windows or VBA, but this looks like a similar error. I assume you aren’t running Crystal Reports, but I guess that the repair suggestion ought to work.

But I’d be tempted to run ccleaner first – it’s pretty good at cleaning up minor registry stuff.

No, I’m not (as far as I know) running Crystal Reports, though I did see from the Microsoft site that to be a cause of my problem. I attempted their solution, but could not locate the problem using either method.

Where do I get ccleaner from?

Reply Quote

Date: 19/04/2013 14:24:22
From: poikilotherm
ID: 297394
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


PM 2Ring said:

I don’t know much about Windows or VBA, but this looks like a similar error. I assume you aren’t running Crystal Reports, but I guess that the repair suggestion ought to work.

But I’d be tempted to run ccleaner first – it’s pretty good at cleaning up minor registry stuff.

No, I’m not (as far as I know) running Crystal Reports, though I did see from the Microsoft site that to be a cause of my problem. I attempted their solution, but could not locate the problem using either method.

Where do I get ccleaner from?

Google seems to escape you :P

http://www.piriform.com/ccleaner

Reply Quote

Date: 19/04/2013 14:25:51
From: KJW
ID: 297395
Subject: re: "Error accessing the system registry" in Office VBA Editor

poikilotherm said:


Re-install Office or use ccleaner?

I don’t think the problem is in Office because it does work in the administrators account that I created when the PC was new.

Reply Quote

Date: 19/04/2013 14:29:33
From: KJW
ID: 297396
Subject: re: "Error accessing the system registry" in Office VBA Editor

poikilotherm said:


Google seems to escape you :P

Well no. I just don’t trust Googled internet sites for something so close to the operating system as a registry cleaner.

Reply Quote

Date: 19/04/2013 14:35:23
From: KJW
ID: 297398
Subject: re: "Error accessing the system registry" in Office VBA Editor

I hoping hoping that the problem was with the specific user account and that it would be solved by creating a fresh account, but no.

Reply Quote

Date: 19/04/2013 14:38:58
From: poikilotherm
ID: 297400
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


I hoping hoping that the problem was with the specific user account and that it would be solved by creating a fresh account, but no.

It seems to me like your user accounts don’t have access to the registry and the VBA editor needs it. Could be wrong.

Can you run regedit through a user account?

Reply Quote

Date: 19/04/2013 14:45:00
From: KJW
ID: 297403
Subject: re: "Error accessing the system registry" in Office VBA Editor

poikilotherm said:

The problem isn’t with account permissions because newly created administrators accounts also fail.

poikilotherm said:


Can you run regedit through a user account?

I can and have run regedit, but what then?

Reply Quote

Date: 19/04/2013 14:45:40
From: poikilotherm
ID: 297404
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


poikilotherm said:

The problem isn’t with account permissions because newly created administrators accounts also fail.

poikilotherm said:


Can you run regedit through a user account?

I can and have run regedit, but what then?



There goes my theory then, that’s what.

Reply Quote

Date: 19/04/2013 14:46:48
From: The Rev Dodgson
ID: 297405
Subject: re: "Error accessing the system registry" in Office VBA Editor

poikilotherm said:


KJW said:

I hoping hoping that the problem was with the specific user account and that it would be solved by creating a fresh account, but no.

It seems to me like your user accounts don’t have access to the registry and the VBA editor needs it. Could be wrong.

Can you run regedit through a user account?

I only looked quickly so I could be wrong, but I was able to access VBA Tools-references when using a guest account without admin rights.

I’m also using 64 bit Windows 7.

Reply Quote

Date: 19/04/2013 14:49:14
From: poikilotherm
ID: 297406
Subject: re: "Error accessing the system registry" in Office VBA Editor

If ccleaner doesn’t fix it, re-install.

Reply Quote

Date: 19/04/2013 14:49:29
From: Teleost
ID: 297407
Subject: re: "Error accessing the system registry" in Office VBA Editor

Try going to C:\Program Files (x86)\Microsoft Office\Office14, then right click on Excel.exe. Click Properties. on the compatibility tab and check the box “Run as administrator” and click Apply/OK.

Reply Quote

Date: 19/04/2013 14:51:24
From: Teleost
ID: 297411
Subject: re: "Error accessing the system registry" in Office VBA Editor

Sorry, I just saw you’re on 64 bit – it’s probably in the normal Programs file

Reply Quote

Date: 19/04/2013 14:56:04
From: KJW
ID: 297414
Subject: re: "Error accessing the system registry" in Office VBA Editor

The problem is something that isn’t shared by ALL accounts, but it is transferred to NEW accounts, irrespective of the new account’s permissions (administrator or standard).

Reply Quote

Date: 19/04/2013 14:58:11
From: KJW
ID: 297415
Subject: re: "Error accessing the system registry" in Office VBA Editor

The Rev Dodgson said:


I only looked quickly so I could be wrong, but I was able to access VBA Tools-references when using a guest account without admin rights.

I’ll have a check with my guest account.

Reply Quote

Date: 19/04/2013 15:08:32
From: KJW
ID: 297419
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


I’ll have a check with my guest account.

The guest account also failed. However, my try did run the guest account for the first time.

Reply Quote

Date: 19/04/2013 15:16:02
From: KJW
ID: 297421
Subject: re: "Error accessing the system registry" in Office VBA Editor

Teleost said:


Sorry, I just saw you’re on 64 bit – it’s probably in the normal Programs file

Actually, it’s in the “Program Files (x86)” folder. The OS is the 64 bit version, but I don’t think Office is.

Reply Quote

Date: 19/04/2013 15:20:04
From: KJW
ID: 297423
Subject: re: "Error accessing the system registry" in Office VBA Editor

Teleost said:


Try going to C:\Program Files (x86)\Microsoft Office\Office14, then right click on Excel.exe. Click Properties. on the compatibility tab and check the box “Run as administrator” and click Apply/OK.

Running Excel.exe from this account (where it fails) as an administrator WORKS!

Reply Quote

Date: 19/04/2013 15:22:01
From: KJW
ID: 297424
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


Running Excel.exe from this account (where it fails) as an administrator WORKS!

But running Excel from a newly created administrator account did NOT work.

Reply Quote

Date: 19/04/2013 15:25:07
From: KJW
ID: 297426
Subject: re: "Error accessing the system registry" in Office VBA Editor

I suspect that if I were to create a new administrator account and run Excel.exe from this account as THAT administrator, then it wouldn’t work.

Reply Quote

Date: 19/04/2013 15:37:51
From: KJW
ID: 297433
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


I suspect that if I were to create a new administrator account and run Excel.exe from this account as THAT administrator, then it wouldn’t work.

Interestingly, I was wrong. I created a new administrators account. Though Excel failed when logged into that account, it succeeded when when I ran it logged into this standard account as that administrator.

Reply Quote

Date: 19/04/2013 15:42:47
From: PM 2Ring
ID: 297438
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


poikilotherm said:

Re-install Office or use ccleaner?

I don’t think the problem is in Office because it does work in the administrators account that I created when the PC was new.

The problem was probably caused by the installation of some other software that’s mucked up some registry entries. And hopefully re-installing Office will fix those registry entries.

Running ccleaner first is a good idea because it will get rid of obsolete registry entries. It’s not uncommon for software to leave a mess behind in the registry when you un-install it.

Reply Quote

Date: 19/04/2013 15:44:40
From: KJW
ID: 297439
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


KJW said:

I suspect that if I were to create a new administrator account and run Excel.exe from this account as THAT administrator, then it wouldn’t work.

Interestingly, I was wrong. I created a new administrators account. Though Excel failed when logged into that account, it succeeded when when I ran it logged into this standard account as that administrator.

I think I know why. Maybe selecting the administrator account is only about the password and that the real administrator is the SYSTEM (a hidden account).

Reply Quote

Date: 19/04/2013 15:53:03
From: KJW
ID: 297440
Subject: re: "Error accessing the system registry" in Office VBA Editor

PM 2Ring said:


The problem was probably caused by the installation of some other software that’s mucked up some registry entries. And hopefully re-installing Office will fix those registry entries.

Running ccleaner first is a good idea because it will get rid of obsolete registry entries. It’s not uncommon for software to leave a mess behind in the registry when you un-install it.

I should point out that the problem occurs in both the Office applications and Access which was a seperately purchased & installed application. Do you think just reinstalling Access would work?

Reply Quote

Date: 19/04/2013 15:55:41
From: KJW
ID: 297441
Subject: re: "Error accessing the system registry" in Office VBA Editor

The actual thing that fails is about getting the definitions of the various classes throughout the system.

Reply Quote

Date: 19/04/2013 16:02:58
From: PM 2Ring
ID: 297442
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


PM 2Ring said:

The problem was probably caused by the installation of some other software that’s mucked up some registry entries. And hopefully re-installing Office will fix those registry entries.

Running ccleaner first is a good idea because it will get rid of obsolete registry entries. It’s not uncommon for software to leave a mess behind in the registry when you un-install it.

I should point out that the problem occurs in both the Office applications and Access which was a seperately purchased & installed application. Do you think just reinstalling Access would work?

That might work. Or the Access installer might see that Office has already set up those registry entries and leave them as they are.

But I’m just guessing; wait to see what the actual Windows experts say.

Reply Quote

Date: 19/04/2013 16:15:08
From: KJW
ID: 297448
Subject: re: "Error accessing the system registry" in Office VBA Editor

PM 2Ring said:


KJW said:

PM 2Ring said:

The problem was probably caused by the installation of some other software that’s mucked up some registry entries. And hopefully re-installing Office will fix those registry entries.

Running ccleaner first is a good idea because it will get rid of obsolete registry entries. It’s not uncommon for software to leave a mess behind in the registry when you un-install it.

I should point out that the problem occurs in both the Office applications and Access which was a seperately purchased & installed application. Do you think just reinstalling Access would work?

That might work. Or the Access installer might see that Office has already set up those registry entries and leave them as they are.

That was my thought also.

Reply Quote

Date: 19/04/2013 19:36:34
From: Dropbear
ID: 297581
Subject: re: "Error accessing the system registry" in Office VBA Editor

If its a 32 bit client the registry on the 64bit machine is not where the 32 bit client expects it to be..

The keys will be under WOW64

Reply Quote

Date: 19/04/2013 19:41:36
From: KJW
ID: 297589
Subject: re: "Error accessing the system registry" in Office VBA Editor

Dropbear said:


If its a 32 bit client the registry on the 64bit machine is not where the 32 bit client expects it to be..

The keys will be under WOW64

I don’t think this is a compatibility issue. I believe that once-upon-a-time it did work.

Yes, I did see “WOW” entries during my head-spinning examination of the registry and events last night.

Reply Quote

Date: 19/04/2013 19:47:29
From: KJW
ID: 297591
Subject: re: "Error accessing the system registry" in Office VBA Editor

BTW, what actually IS the registry? By that, I mean, how can I make sense of what the various entries in it actually mean? For a start, what does all that hexadecimal between the braces “{…}” actually mean?

Reply Quote

Date: 19/04/2013 19:50:12
From: Dropbear
ID: 297595
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


BTW, what actually IS the registry? By that, I mean, how can I make sense of what the various entries in it actually mean? For a start, what does all that hexadecimal between the braces “{…}” actually mean?

It’s a database of key:value pairs in a hierarchical structure. The value can be of different types.

Reply Quote

Date: 19/04/2013 19:51:20
From: The Rev Dodgson
ID: 297596
Subject: re: "Error accessing the system registry" in Office VBA Editor

I actually did a blog post about WOW64:

http://newtonexcelbach.wordpress.com/2013/03/28/installing-dlls-on-64-bit-windows/

But I don’t think that will help your problem.

You shouldn’t have to mess around with the registry just to open the references in the VBE.

Reply Quote

Date: 19/04/2013 20:11:51
From: KJW
ID: 297628
Subject: re: "Error accessing the system registry" in Office VBA Editor

The Rev Dodgson said:


You shouldn’t have to mess around with the registry just to open the references in the VBE.

I agree, but I might have to if something stuffed up some entries.

I do feel a little bit more secure now that I know Excel works properly if run as an administrator. That is, at least I know Excel itself isn’t damaged and I rarely (if ever) need to access other applications anyway.

Reply Quote

Date: 20/04/2013 19:11:51
From: KJW
ID: 298401
Subject: re: "Error accessing the system registry" in Office VBA Editor

Well, tried running ccleaner on the registry, and the problem wasn’t fixed. I then tried the following sequence:

Uninstall Access
Run ccleaner on the registry
Install Access

That also didn’t work.

I’m somewhat hesitant about reinstalling ALL the Office applications, and I’m especially reluctant to reinstall Windows 7.

My biggest problem, assuming it’s a misconfigured entry in the registry, is how to find it. Any suggestions that doesn’t involve manually looking at each entry?

Reply Quote

Date: 20/04/2013 19:13:23
From: monkey skipper
ID: 298404
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


Well, tried running ccleaner on the registry, and the problem wasn’t fixed. I then tried the following sequence:

Uninstall Access
Run ccleaner on the registry
Install Access

That also didn’t work.

I’m somewhat hesitant about reinstalling ALL the Office applications, and I’m especially reluctant to reinstall Windows 7.

My biggest problem, assuming it’s a misconfigured entry in the registry, is how to find it. Any suggestions that doesn’t involve manually looking at each entry?

Could you simply do a system restore to the date prior to the error reading in the system?

Reply Quote

Date: 20/04/2013 19:16:33
From: KJW
ID: 298407
Subject: re: "Error accessing the system registry" in Office VBA Editor

monkey skipper said:


Could you simply do a system restore to the date prior to the error reading in the system?

I don’t know when the problem actually started, and I’m very reluctant to do any sort of extensive “Undo” operation.

Reply Quote

Date: 20/04/2013 19:17:07
From: monkey skipper
ID: 298409
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


monkey skipper said:

Could you simply do a system restore to the date prior to the error reading in the system?

I don’t know when the problem actually started, and I’m very reluctant to do any sort of extensive “Undo” operation.

I would.

:-)

Reply Quote

Date: 20/04/2013 19:21:37
From: KJW
ID: 298416
Subject: re: "Error accessing the system registry" in Office VBA Editor

monkey skipper said:


KJW said:

I’m very reluctant to do any sort of extensive “Undo” operation.

I would.

:-)

While I’m very thankful that the “Undo” button (or whatever) exists, I very strongly dislike using it.

Reply Quote

Date: 20/04/2013 19:25:27
From: monkey skipper
ID: 298419
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


monkey skipper said:

KJW said:

I’m very reluctant to do any sort of extensive “Undo” operation.

I would.

:-)

While I’m very thankful that the “Undo” button (or whatever) exists, I very strongly dislike using it.

Could you right click on the message that displays and select locate file or something similar to what is possible in XP?

Reply Quote

Date: 20/04/2013 19:29:33
From: KJW
ID: 298422
Subject: re: "Error accessing the system registry" in Office VBA Editor

monkey skipper said:


KJW said:

monkey skipper said:

I would.

:-)

While I’m very thankful that the “Undo” button (or whatever) exists, I very strongly dislike using it.

Could you right click on the message that displays and select locate file or something similar to what is possible in XP?

I don’t know. The Help button wasn’t useful.

Reply Quote

Date: 20/04/2013 19:30:00
From: monkey skipper
ID: 298423
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


monkey skipper said:

KJW said:

While I’m very thankful that the “Undo” button (or whatever) exists, I very strongly dislike using it.

Could you right click on the message that displays and select locate file or something similar to what is possible in XP?

I don’t know. The Help button wasn’t useful.

How helpful

Reply Quote

Date: 20/04/2013 19:31:13
From: KJW
ID: 298427
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


monkey skipper said:

KJW said:

While I’m very thankful that the “Undo” button (or whatever) exists, I very strongly dislike using it.

Could you right click on the message that displays and select locate file or something similar to what is possible in XP?

I don’t know. The Help button wasn’t useful.

Right-clicking the MsgBox didn’t do anything.

Reply Quote

Date: 20/04/2013 19:33:00
From: monkey skipper
ID: 298428
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


KJW said:

monkey skipper said:

Could you right click on the message that displays and select locate file or something similar to what is possible in XP?

I don’t know. The Help button wasn’t useful.

Right-clicking the MsgBox didn’t do anything.

If you put the error message into google I would suspect strongly an array of explanations will display. there are often sites about such error messages and bulletin boards where they discuss the steps to fix the errors.

Reply Quote

Date: 20/04/2013 19:35:11
From: KJW
ID: 298431
Subject: re: "Error accessing the system registry" in Office VBA Editor

monkey skipper said:


How helpful

This helpful:

Some operations must access your system’s registration database. This error has the following cause and solution:

The registration database for your system has been corrupted.
Run the Setup program for the host application again.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

© 2010 Microsoft Corporation. All rights reserved.

However, that was the Offline Help screen. Maybe I should try the Online version.

Reply Quote

Date: 20/04/2013 19:36:55
From: monkey skipper
ID: 298432
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


monkey skipper said:

How helpful

This helpful:

Some operations must access your system’s registration database. This error has the following cause and solution:

The registration database for your system has been corrupted.
Run the Setup program for the host application again.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

© 2010 Microsoft Corporation. All rights reserved.

However, that was the Offline Help screen. Maybe I should try the Online version.

Sounds like a plan.

Reply Quote

Date: 20/04/2013 19:38:41
From: KJW
ID: 298433
Subject: re: "Error accessing the system registry" in Office VBA Editor

monkey skipper said:


KJW said:

KJW said:

I don’t know. The Help button wasn’t useful.

Right-clicking the MsgBox didn’t do anything.

If you put the error message into google I would suspect strongly an array of explanations will display. there are often sites about such error messages and bulletin boards where they discuss the steps to fix the errors.

I actually have done that and did find information about the error. The problem is that I need to find the offending registry entries and fix them.

Reply Quote

Date: 20/04/2013 19:39:24
From: monkey skipper
ID: 298434
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


monkey skipper said:

KJW said:

Right-clicking the MsgBox didn’t do anything.


If you put the error message into google I would suspect strongly an array of explanations will display. there are often sites about such error messages and bulletin boards where they discuss the steps to fix the errors.

I actually have done that and did find information about the error. The problem is that I need to find the offending registry entries and fix them.

Does the error message have a number?

Reply Quote

Date: 20/04/2013 19:44:09
From: wookiemeister
ID: 298438
Subject: re: "Error accessing the system registry" in Office VBA Editor

http://www.vbforums.com/showthread.php?545433-RESOLVED-Sudden-quot-Error-accessing-the-system-registry-quot

Reply Quote

Date: 20/04/2013 19:45:16
From: KJW
ID: 298440
Subject: re: "Error accessing the system registry" in Office VBA Editor

monkey skipper said:


Sounds like a plan.

The Online version said the same thing.

Anyway, I already have a good idea about what the error is about. It seems to be about the VBA editor making a request to the registry and that request being denied due to insufficient permissions.

Reply Quote

Date: 20/04/2013 19:58:02
From: KJW
ID: 298451
Subject: re: "Error accessing the system registry" in Office VBA Editor

wookiemeister said:


http://www.vbforums.com/showthread.php?545433-RESOLVED-Sudden-quot-Error-accessing-the-system-registry-quot

Thanks wookiemeister. :-) That seems to be along the same lines as what I’ve already read, BUT… it does provide more detail about the fix.

Reply Quote

Date: 20/04/2013 20:11:06
From: wookiemeister
ID: 298457
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


wookiemeister said:

http://www.vbforums.com/showthread.php?545433-RESOLVED-Sudden-quot-Error-accessing-the-system-registry-quot

Thanks wookiemeister. :-) That seems to be along the same lines as what I’ve already read, BUT… it does provide more detail about the fix.


normally you’ll find something in forums for this kind of thing

Reply Quote

Date: 20/04/2013 20:34:46
From: KJW
ID: 298471
Subject: re: "Error accessing the system registry" in Office VBA Editor

Crispin said:


Smile Re: Sudden “Error accessing the system registry”

Another update:

iTunes (and other apps yet to come) may also cause this problem in Win7. This is because it runs a service which creates registry keys under the SYSTEM account. When VB tries to enumerate the keys under HKCR\TypeLib it fails and gives the error because the user running VB6.EXE (even if it set to run as administrator) does not automatically have READ rights to the key. At that point you get the “Error accessing the system registry” dialog. To workaround/fix this: 1. Download Procmon and PsExec from sysinternals. 2. Run Procmon and add a “ProcessName” filter with VB6.EXE as the process name. 3. Then Select Project->References. And the error dialog should pop up. 4. Switch to procmon and scroll to the end of the events list – you’re looking for the last “ACCESS_DENIED” message for opening a registry key under HKCR\TypeLib. 5. Thats the first key you need to change permissions on – so you’ll need to run regedit in the same account context that the keys were created in – the SYSTEM account. to do this install psexec on the windows PATH somewhere then run: psexec -i -d -s c:\windows\regedit.exe (obviously change the path if yours is different) this will run regedit through the SYSTEM account. You can verify that even the administrator account does NOT have permission to edit these keys by running regedit through a Start->Run dialog as this elevates the priv’ level to administrator. 6. Find the key you identified in step 4 – right click it and select Permissions. 7. Find the current logged on user that you use to run VB6 with and add them with full control to the permissions list. 8. Repeat steps 3-7 because there may be more keys that exhibit this behaviour, until the Project->References dialog appears in VB6 without error. You could also open the .vbp in notepad to see the references if you’re stuck and dont have time to do the above…..
Reply Quote

Date: 20/04/2013 22:12:51
From: KJW
ID: 298551
Subject: re: "Error accessing the system registry" in Office VBA Editor

I fixed it! :-)

It only took the editing of the permissions of a single key in the registry.

Reply Quote

Date: 20/04/2013 22:30:13
From: The Rev Dodgson
ID: 298563
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


I fixed it! :-)

It only took the editing of the permissions of a single key in the registry.

Congratulations!

How did you find which one?

Reply Quote

Date: 20/04/2013 22:42:13
From: KJW
ID: 298565
Subject: re: "Error accessing the system registry" in Office VBA Editor

The Rev Dodgson said:


KJW said:

I fixed it! :-)

It only took the editing of the permissions of a single key in the registry.

Congratulations!

How did you find which one?

By running Procmon (downloaded from sysinternals). I had already done this the other night, but didn’t know how to filter the events so that only Excel events were displayed. While Procmon is capturing (Excel) events, evoke the error in Excel, then look for the key that has the “ACCESS DENIED”.

To edit the registry, one needs to run regedit under the SYSTEM account.

Post 298471 above outlines the procedure (for VB6).

Reply Quote

Date: 20/04/2013 23:03:54
From: KJW
ID: 298572
Subject: re: "Error accessing the system registry" in Office VBA Editor

KJW said:


Post 298471 above outlines the procedure (for VB6).

One thing I should say is that whereas that post says to give the user “Full Control” permission, it is only necessary to give it “Read” permission.

I more-or-less followed this list which I obtained from elsewhere:

Administrators – Full Control
Everyone – Read
System – Full
Users – Read
Modify the user list to suite your needs.

Reply Quote