Compile Error: cant find library or folder (DATE) in VBA

MrHydrant1857

New Member
Joined
Mar 29, 2019
Messages
35
I am running a macro in excel and i am having trouble with this error popping up and highlighting the Year(DATE) formula in my vba. i have searched and searched and have found things on how to replace the referrences but i dont know what reference to use to solve this issue. my program runs perfect on one computer but not another. can someone please help.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Go to the computer where it is running correctly on, go to the VB Editor, and select "References" under the Tools menu.
Note which references are selected.

Now go to the computer where it isn't working and do the same.
Does it have all the same references selected?
If not, select the missing ones (the version numbers may be a little different, just select the latest version available).
 
Upvote 0
the problem with the computer it is not working on will not let me select references. it is not highlighted. any reason that may be?
 
Upvote 0
Are they both using the same versions of Excel?
Is VBA enabled on that computer?
 
Upvote 0
i believe the excel where this program was created intitially is in Office 365 and doesnt really give a year. looks like 13 or 16. the excel where its not working is 2010. i am certain that the vba is for 2010 and newer. i was able to fix some of the compile errors with the (DATE) by just putting (vba.DATE). now it wont recognize Signature for the email code i have in it. from what i see this is all failing because its being run in excel 2010
 
Upvote 0
I don't understand what you said back here:
the problem with the computer it is not working on will not let me select references. it is not highlighted. any reason that may be?
If that computer has working VBA, you should be able to see and select References.

What references are selected on the computer where it works?
What references are selected on the computer where it does not work?
 
Upvote 0
what I meant by that was, the computer I am having the compile error is not letting me view the references. under tools the references is just grayed out so I cannot see what references are missing or not. the computer where the program works fine has these references: visual basic for applications, Microsoft excel 16.0 object library, OLE Automation, Microsoft Office 16.0 object library, Microsoft Forms 2.0 object library.
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,999
Members
448,543
Latest member
MartinLarkin

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