Error 336

S

SSaxman

I have a spreadsheet that I created in Excel 2003 on my work laptop. Within
that spreadsheet I have a button that actiavtes a user form that I created
in VBA (UserForm2). I had to switch computers yesterday because my other one
crapped out on me. On the new computer (same OS and Office Version), when I
open the spreadsheet and click the button to access the user form or if I try
to edit the user
form in VBA, I get an error message stating "Component not correctly
registered." When I click 'Help,' it expands the error: "ActiveX Component
not correctly registered (Error 336): The ActiveX component has not been
properly registered in the system registry." I am pretty much a novice when
it comes to VBA, having just recently gotten my feet wet. Can anyone please
tell me how I can fix this problem? Thanks!
 
T

Tom Ogilvy

Let's try the simplest first

close excel.

go to the windows temp directory and delete any files there and any
subdirectories to the temp directory which relate to Excel or Office or VBA.

Now

Go to the Windows=>Run menu

enter

Excel.Exe /UnRegServer

and click OK.


then repeat with

Excel.Exe /RegServer


This should restore the Excel registry entries.

Then start Excel in an in a new workbook, go to the VBE and do Insert
Userform

now in the VBE go to tools => References, you should have a reference to
Microsoft Forms 2.0 Object Library

If you do, then you should try opening your problematic workbook and see if
it will work.
 
S

SSaxman

Tom,

I read your directions completely before following them. I did everything
you listed, and I did have a reference to the Microsoft Forms 2.0 Object
Library, however, when I attempt to edit the user form or activate it from
the spreadsheet, I continue to receive the same error message. Any other
ideas?

Thank you!

Ty
 
S

SSaxman

Anyone have any ideas?

SSaxman said:
Tom,

I read your directions completely before following them. I did everything
you listed, and I did have a reference to the Microsoft Forms 2.0 Object
Library, however, when I attempt to edit the user form or activate it from
the spreadsheet, I continue to receive the same error message. Any other
ideas?

Thank you!

Ty
 
T

Tom Ogilvy

Error 336 means:

The ActiveX component has not been properly registered in the system
registry.

but you said it is properly registered.
And if you successfully followed my instructions, then you were able to
create a userform in a new workbook.

Perhaps you have a non-msforms 2.0 control on your userform and that is what
is not registered.
 
L

Larry Shoots

I am using Excel in Windows XP Professional. I created a macro program to
print memo forms. I have two computers on a network. My laptop (hp Pavilion
dv1150) and a slightly older Amdahl 600 Mhz Clone.
I placed a copy of the Excel Worksheet which contained all the code onto my
Amdahl. When I went to the Amdahl and attempted opening the program, I got
the dreaded, "Object Library not registered". Then another window opened
indicating that this error would be repaired. What it did was remove the
entire code I had entered in VB.
Fortunately, I had saved a copy of the code in a word document. I rewrote
the code and tested it out on the laptop. It worked. Again, I copied it to
the Amdahl. Again, I received the dreaded error. So, I'm going to try the
recommendation you gave to Mr. Sussman. I hope it works. Why did this
happen? Both computers have Office XP professional. Why is this happening?
 
J

JTJams

I have a similar problem with Excel 2003, although it is not related to a
form and I currently do not have any Add-Ins selected. I believe it's
related to my system's Visual Basic component registration, because
"Microsoft Visual Basic" is displayed in the title bar of both the error:
"336" and the error: "component not registered correctly." dialogues I
experience on startup, shutdown, and when using keyboard
shortcuts. If I use menu commands instead of the shortcuts, I do not
experience the problem.

I've installed the latest Office updates, but this doesn't appear to update
or repair any VB files, and I think that's what is necessary. Any
suggestions for repairing my system's Visual Basic files or component
registration?

Thank you, JT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top