Compile error- 'Error in loading dll' (Access 2002)

Mudface

MrExcel MVP
Joined
Feb 18, 2002
Messages
3,339
When attempting to run (or even just compile) the following code, I get the .Connection object of the CurrentProject highlighted along with a message box saying 'Error in loading dll'.

Code:
Public Sub Test()
Dim cat As ADOX.Catalog

Set cat = New ADOX.Catalog

cat.ActiveConnection = CurrentProject.Connection

End Sub

I've checked my references, and there's nothing highlighted as missing, but I've noticed that when I create a new database, I often get the message 'Object Library not registered' when first creating a new object in the database (Table, Module etc). Is this a case for a reinstallation, or is there another fix (I've tried re-registering some of the dll's but the problem has persisted). Cheers for any help.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hello mate,

It's a long shot but have you tried running Detect and Repair from the help menu? If that doesn't work then you could try reinstalling the latest version of MDAC from here. Amongst other things this will install the ADO and ADOX libraries and associated DLLs.

Good luck. Fixing problems with these libraries as well as the Jet components is a pain in the **** - I've wasted hours of beer drinking time downloading, reinstalling, rebooting, downloading again...... :devilish:
 
Upvote 0
Hi, Dan. Unfortunately, the Detect and Repair didn't :LOL: .

I got the MDAC component checker from the link you provided however, and there were quite a few missing registry entries for ADOX. Naturally, our Network Admin guy isn't around at the minute and even more obviously I don't have admin rights on my PC so I can't install the latest components... Cheers for your help, though, I'll repost when I can get the new components installed.
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top