Can't remove an Excel reference

B

Bill Murphy

I have an Access 2002 app running under Windows 2000. On my PC at work I
have Excel 2003 installed, and the app has a reference to Excel 11.0. On my
home PC I'm running Excel 2002, and the app needs a reference to Excel 10.0.

When I bring a copy of mdb file home and attempt to remove the reference to
Excel 11.0 so I can reset it to Excel 10.0 I get an error 17 "Can't perform
requested operation". I suspect this is related to a missing or corrupted
dll file, since I just installed the Microsoft .Net Framework 1.1 a few days
ago.

Any thoughts on how to resolve this will be greatly appreciated.

Bill
 
A

Allen Browne

Create a new (blank) database using Access 2002.
Immediately, uncheck the Name AutoCorrect boxes under:
Tools | Options | General

Then remove the references you do not need.
Do not add the Excel 10 reference.

Import everything from the existing database:
File | Get External | Import

Then use late binding instead of adding the Excel reference, i.e. declaring:
Dim xxxx As Object
instead of as a specific Excel object type.
 
B

Bill Murphy

Allen,

I followed these steps, and was able to import all the objects except VBA
modules into the new mdb file. When attempting to import modules I got
"Error in loading DLL" on each one. After clicking Ok on each error I
received a second error message that "Name conflicts with existing module,
project or library".

To further test this I created a new blank mdb and tried to import just the
modules from another mdb into it. I got the same error messages as above.
I also opened a completely different mdb for an existing app that has been
functioning well for over a year, and while attempting to remove or add
references received error messages.

I also completely uninstalled Access 2002 and reinstalled it from my
original CD, which had no effect.

I have Access 2000 installed on this same PC. I created a new mdb and had
no problem creating a new module or when importing modules from another mdb.

This leads me to believe that some dll file that Access 2002 depends upon
has either been corrupted or overwritten by an incompatible dll, probably a
week ago when I was in the process of reinstalling the Microsoft .Net
Framework 1.1.

Do you have any further thoughts on this?

Bill
 
A

Allen Browne

When you created the new MDB file, did you use a filename the same as that
on one of the modules? If so, the VBA project will have that name, and this
could be the conflict. Create a file with a different name, or change the
project name under Tools | xxxx Propeties from the code window (where xxxx
is the project name.) Or you could change the module name.

If that does not solve the problem a decompile might.

Or there might be an issue with references.
 

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