How to get rid of VBA-reference??

P

Peter_A_M (NL)

I've been using a spreadsheet for quite a long time now, with VBA code I
wrote in modules functioning very well.

Since recently code doesn't work anymore, because Excel searches for a
missing object library. The reference is to a file PdfLib.TWD, which seems to
belong to Adobe Reader 5.0.
(I have updated from Adobe Reader 5.0 to 6.0, but the PdfLib.TWD file
belonging to version 5 is still present in C:\Program Files\Adobe\Acrobat
5.0\Reader\ActiveX.)

I tried to get rid of this reference by unchecking it, but this is
impossible because Excel says that this library is still in use. I'm not
aware of anything! However, there is a userform present in this workbook,
just using some "ordinary" controls (command buttons, checkboxes, etc.;
nothing "exotic").

I've even tried what happened when I deleted the userform. Excel still
needed the reference.

Could anyone help me out?
Thanks in advance!
Peter

PS
To make it even stranger (at least for me) the following.

I'm still using Excel 97 under Windows XP SP2. This is at home.
Ofcourse I tried the same in my office (Excel 2002 SP3): no problem
whatsoever as to functioning of the code!
The "strange" reference now showed as MISSING, but I still couldn't uncheck
it!

I then saved a copy of the file and tried it at home again: same problems as
before.
The only difference was that the path it was looking for had changed to the
"office path" I had been using to save the file. And I still cannot delete
the reference!

What could be the solution tho all of this??
 
T

Tom Ogilvy

Try hitting the reset button, then try removing the reference.

If you can't remove it that way, you can remove it with code. Look at the
references object in the VBA Extensions library. It has a remove method.
 
P

Peter_A_M (NL)

Thanks for your suggestions.
Hitting the Refresh button didn't work (I had tried that numerous times
already!).
The VBA approach you suggested, was in my mind also; I'll try it as soon I
find the time!
Thanks again,
Peter
 

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