Error in loading DLL

D

Dan Tabla

I have a program that evolved for few months. Initialy, I had a form with
some checkBoxes but by the time I ended up not using one
of the checkBox therefore I deleted from the UserForm.

Now, when I tried to delete this code or put ' sign:


If chkRuby Then
Application.CommandBars.FindControl(ID:=1849).Execute
End If


the Excel is giving me this error "Error in loading DLL"

Is true that my code is not well organized and very long but...

Thank you for any suggeston, idea!!!
 
C

Chip Pearson

The first three things I would do are these:

One, check your references. In VBA, go to the Tools menu, choose
References, and ensure that none are marked MISSING. Uncheck any that
are MISSING if you don't need them.

Second, close Excel and then go to the Windows Start menu, choose Run
and enter

"C:\Program Files\Microsoft Office\Office11\Excel.exe" /unregserver

Of course, change the path to your installation of Excel. Then repeat
this but change /unregserver to /regserver . This sets Excel back to
"factory defaults" and can cure any number of ills.

The third thing I would try is cleaning out VBA's internal code
storage regions. This involves exporting all the code to plain text
files, destroying the modules, and importing the code from the text
files. Rob Bovey has an add-in that reduces all of that to a few mouse
clicks. See http://www.appspro.com/Utilities/CodeCleaner.htm . Rob's
Code Cleaner is one of the "must have" add-ins for serious Excel
development.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 

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