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

MrHydrant1857

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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
52,067
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
15
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
52,067
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
15
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
52,067
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
15
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.
 

Forum statistics

Threads
1,089,332
Messages
5,407,633
Members
403,156
Latest member
Fahad Saleem

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top