PDA

View Full Version : Sleeper: UserForm Error from Thin Air



ACBLuke
05-09-2005, 08:30 AM
I am running Excel 2000, version 9.0.6926 SP-3. I have a workbook that has numerous macros and uses custom userforms to get input. These worked fine for a long time. Now whenever my code attempts to use them or I try to display them from VBE, I get a "Component not correctly registered" error. I am able to view the associated code, but not the userforms themselves. When I try to import these userforms into another workbook, I get an EOF error, and the userform doesn't import.

Any ideas on how to get these working again?

Tim

Bob Phillips
05-09-2005, 09:12 AM
Don't know that this will work, but from the erro give this a try.

Export the userfom, and then read the exported file in a text editor, like Notepad (it is only a calls module, so no problems).

Then create a userform in another project, export that and view that in a txet editor. See if the first has anything obvious missing. If so, delete the original in the VB IDE, and re-import the amended version.

If that fails, try the same process with a hex editor.

ACBLuke
05-09-2005, 09:30 AM
Thanks for the idea. Unfortunately, I can't export the form. I get a "Component not correctly registered" error when I try to export. After clearing the error, it creates an export file, but it's empty. I had exported it before, but I didn't realize it was empty. That explains the EOF error, I guess.

Good idea. I wish it worked, but Excel and VBE seem to want nothing to do with this userform.

Bob Phillips
05-09-2005, 09:57 AM
Have you tried Rob Bovey's code cleaner, available ay http://www.appspro.com/Utilities/CodeCleaner.htm.

It might not (probably won't) work as I think it also does an export/import, but it has to be worth a shot before hitting the bottle.

MOS MASTER
05-09-2005, 10:23 AM
I am running Excel 2000, version 9.0.6926 SP-3. I have a workbook that has numerous macros and uses custom userforms to get input. These worked fine for a long time. Now whenever my code attempts to use them or I try to display them from VBE, I get a "Component not correctly registered" error. I am able to view the associated code, but not the userforms themselves. When I try to import these userforms into another workbook, I get an EOF error, and the userform doesn't import.

Any ideas on how to get these working again?

Tim
Hi and Welcome to VBAX! :hi:

From the error it seams to me that you're using a custom control in your UserForm?

These normaly have there own OCX file (System32)
Those files should be registerd to the OS via regsvr32 (or some other means)

If there is a violation error like this one you need to find out which library is missing.

Go to (in de VBE (ALT+F11)) Tools/References and check if there is a line in there that begins with Missing

Select that line and ussually you read to which OCX it's refering (Path) (And then you can look for it and reregister it to the OS)

See if this helps you on you're way.

Enjoy! :whistle: