# Microsoft Office Application Help - Excel Help forum > Excel Programming / VBA / Macros >  >  Error in loading DLL

## costadina

Over the weekend I did some edits to an Excel file on my home computer.  This morning I did some edits to the file on my work computer.  When I try to access the VBA code, I get the message "Error in loading DLL", which is error 48.

I am really lost on this.  Help!

----------


## excel_1982

Go into tools menu in the VBA environment and look in reference to see if anything dll is missing. If it is then it will say MISSING.

----------


## costadina

You are right.  I went there and a box is check that says

"MISSING:  Ref Edit Control"

Now what should I do?

----------


## excel_1982

In the VB editor, select Tools, References, and unclick the refedit control
reference.  It is not needed.  It is a bug in VBA that appeared about six
months ago with one of Microsoft's hot fixes as far as I can tell.  It gets
introduced when one adds a refedit to a userform.  Some installations can
handle it, some can not.

----------


## costadina

Excel will not allow me to uncheck that box.  I can uncheck it, but if I close the window and reopen it, the box is reset to the checked position.

The IT guy recommended that I go to the Run command line in windows and type

REGSVR32 c:\Program Files\Microsoft Office\Office12\REFEDIT.DLL

but it won't load.  So that isn't working either.

----------


## excel_1982

Try copying the dll from the working computer to the the non-working computer and then select it in the references.

----------


## Kenneth Hobson

It should be in your Toolbox of controls.  Select a Userform and then the menu View in VBE and then Toolbox.  It may use one version and you have another.  You should be able to delete and add it there.  You may need to edit your Userforms that use that control as well.

Please update your member profile to show your Excel version.

----------


## costadina

It was a Microsoft Service Pack issue.

At home I have the latest service pack loaded, but here at work I wrongly assumed IT automatically loaded service pack updates, which they don't.  That was the whole problem.

I appreciate all of your help!  :Smilie:

----------


## Kenneth Hobson

Good deal!  

That is why I recommend that people add their number from Help > About.  Notice that I have sp2 and sp3 shown in my profile.  The sp2 is on my work computer.  Most times though, I don't have that many issues between the two.

----------


## Tesa

I had a same problem with a macro. I was editing and it was working on my data, but when I tryed to run on other data it showed the "Error in loading DLL". 
How I solved this problem!
In Tools -> References and I pointed on the "Missing: Ref Edit Control" and on the bottom of this box "Location:C:\Program Files\Microsoft Office\OFFICE12\REFEDIT.DLL" was. So on the other data I created the "OFFICE12" folder in to "Microsoft Office" and I copyed from my data the "REFEDIT.DLL" in to it. I have both Office (2003, 2007)  and I used the 2007 "REFEDIT.DLL". And now is working fine. I wrote the MACRO in 2003, but it worked just with the 2007 "REFEDIT.DLL"

So I hope I could help you

/Sorry for my english  :Smilie:  /

----------


## TheNewGuy

I also had this problem and the advise above worked, and it wasn't letting me remove the checked box either. But instead of going to the lengths described above, I just closed my workbook, then opened up again and disabled the Macro's, then it would let me remove the check in the box, and delete REFedit from the user form toolbox. Seems to have worked just fine. Thanks for the help.

----------


## mmaxi786

Dear all above  i have don lot of tactics to solve this issue at last .. i am thankful of God that it is solved firstly open ur desired file disable all macros the save the document and save it .. then close all the ms-office documents. and reopen your desired file..without touching and editing go to vba click on tools option > reference  then uncheck "Missing Dll ......" then press ok .. close vba save and close document. then re-open it then enable all macros and ...start your your..  :Smilie:

----------


## sudopudge

> Dear all above  i have don lot of tactics to solve this issue at last .. i am thankful of God that it is solved firstly open ur desired file disable all macros the save the document and save it .. then close all the ms-office documents. and reopen your desired file..without touching and editing go to vba click on tools option > reference  then uncheck "Missing Dll ......" then press ok .. close vba save and close document. then re-open it then enable all macros and ...start your your..



The above post worked for me and saved my butt. The only difference is that I needed to re-save the document after re-enabling macros. Then re-open (yes lots of re's) the document and continue on my merry way. I may be happy now but I was fuming a few minutes ago, and was about to launch a raid on Redmond. Thanks mmaxi786!

----------


## Maharaj

This solution works brilliantly

----------

