Reference Error

Hap

Well-known Member
Joined
Jul 20, 2005
Messages
647
My project is throwing an error. I've been switching back and forth between 2000 and 2010 so I'm assuming something happened in my latest file as this hasn't occurred before.

I'm getting a "Compile Error: Can't Find Object or Library" Msgbox when compiling. The error is being thrown for objects like VBA's Date, or Time objects, which I changed to read VBA.Date but I think with the correct reference I don't need to do this. Any idea which reference is missing?

I added a reference to Microsoft ActiveX Data Objects 6.0 Library in the newer version of Excel but I don't think its available in 2000. Did adding this reference change something I didn't intend? How to correct this?

Thank you
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
I have found that generally VBA copes when moving to a later version of Excel and may, or may not, have a problem trying to run in an earlier version.
By looking at (VBA) Tools | References you may see that a reference has been marked as 'MISSING' and that needs to be corrected. For the problem that you describe you probabably need the 2.8 (or earlier) library.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,673
Members
452,937
Latest member
Bhg1984

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