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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
53,746
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,746
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,746
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,102,859
Messages
5,489,309
Members
407,686
Latest member
Chuck1960

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top