PDA

View Full Version : Problem: ClassFactory cannot supply requested class



hlev
07-26-2010, 07:46 AM
Hi, I've got an .xlam add-in which have worked fine before, but now throws the error in the thread title when opened.

This error seems to be invoked by certain forms that use either ListView or ProgressBar controls from Microsoft Windows Common Controls 6.0 (SP6), system32\mscomctl.ocx

The reference to the library is not missing.

Apart from VBA is unable to compile the project, the error results in the forms not display properly in the editor on my machine, whereas they do and the add-in runs fine on a fellow colleague's computer. (Both running Office 2007)

We have cross-checked the versions of MSCOMCTL.OCX and COMCTL32.OCX, they mismatched, my ones were newer.

I have unregistered both libraries with REGSRV32 and replaced them with:
MSCOMCTL.OCX: 6.1.97.86 -> 6.1.97.82
COMCTL32.OCX: 6.0.81.6 -> 6.0.80.22
and then re-registered them.

This did not fix the error.
The symptom is if I try to add a ListView control to any form, or load an existing form that contains one, VBA throws the aformentioned error.

Any idea is much appreciated, I couldn't find resolution after browsing several google or ms support articles. Thanks.

krixxie
12-06-2010, 02:34 AM
Hey Hlev

Could you fix this problem? What have you done to use the listview again?

I have the same error and I've done also the same attempts to fix it. I have also reinstalled the microsoft office, but nothing worked :/
I also tried the update of msdn for this two libraries... but nothing fixed this stupid error :/

Could you found any solution?

greets.

hlev
12-06-2010, 03:44 AM
Hey,

First try and delete every .exd file on your system. These are temp files of object libraries that Office creates during installations and updates and can mess up things in VBA.
lessanvaezi.com/delete-exd-files-to-fix-object-library-invalid-error/

If this doesn't work, you're about to do some registry hacks.
First, download Process Monitor
technet.microsoft.com/en-us/sysinternals/bb896645.aspx

This is an excellent utility that will help you identify what exactly goes wrong by real-time logging the running processes. (ie. you'll see what Office is trying to read from the registry when it throws the error). Then you can google on the registry key and find out what the proper value should be and manually fix your registry.

krixxie
12-07-2010, 06:01 AM
hey

thanks !!!
I will try it. If it works, i will let you know!!!! =)

thanks for your reply!

krixxie
12-13-2010, 06:51 AM
Hey

So I've tried it, but I haven't fixed it yet.

I've deleted the .exd files, but this didn't solve the problem :(

Now I'm trying to solve it with this tool and it told me, that windows looks for "HKLM\SOFTWARE\Microsoft\CTF\KnownClasses", but this path doesn't exist... I haven't figured it out yet... Do you have any clue?

thanks

krixxie
12-14-2010, 05:40 AM
Now I tried to create the Listview (Microsoft ListView Control 6.0 (SP6)) in Access and not in Excel - and it worked!!! Does anybody understand this? I'm really frustrated and I don't know, what I can do :/

In VB6 I tried also to use the ListView control, but here I got another error message (Error Accessing the System Registry).

Does anybody have further ideas?

thanks

krixxie
12-15-2010, 05:38 AM
I solved it!!!

I solved it with this vb6 update Microsoft Visual Basic 6.0 Service Pack 6 Cumulative Update.

I don't know why it was the problem, because I haven't changed anything besides some windows updates and the update is from 2009.
But whatever - it fixed my problem!

thanks ;)

kvnfrnk
01-19-2011, 11:39 PM
I have the same problem with Visual Basic. NET 2003. A year ago it worked perfectly, but as I have not used for a year and now does not work correctly. So what I understand the problem is caused by the installation of a new ActiveX version of something. So not only can solve the problem by installing the previous version again?