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

MrHydrant1857

New Member
Joined
Mar 29, 2019
Messages
17
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.
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,615
Office Version
365
Platform
Windows
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).
 

MrHydrant1857

New Member
Joined
Mar 29, 2019
Messages
17
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?
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,615
Office Version
365
Platform
Windows
Are they both using the same versions of Excel?
Is VBA enabled on that computer?
 

MrHydrant1857

New Member
Joined
Mar 29, 2019
Messages
17
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
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,615
Office Version
365
Platform
Windows
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?
 

MrHydrant1857

New Member
Joined
Mar 29, 2019
Messages
17
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,101,819
Messages
5,483,090
Members
407,379
Latest member
Bender1964

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top