Compile Error: cant find library or folder (DATE) in VBA
Results 1 to 8 of 8

Thread: Compile Error: cant find library or folder (DATE) in VBA
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Mar 2019
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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.

  2. #2
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,026
    Post Thanks / Like
    Mentioned
    52 Post(s)
    Tagged
    11 Thread(s)

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

    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).
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  3. #3
    New Member
    Join Date
    Mar 2019
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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?

  4. #4
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,026
    Post Thanks / Like
    Mentioned
    52 Post(s)
    Tagged
    11 Thread(s)

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

    Are they both using the same versions of Excel?
    Is VBA enabled on that computer?
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  5. #5
    New Member
    Join Date
    Mar 2019
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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

  6. #6
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,026
    Post Thanks / Like
    Mentioned
    52 Post(s)
    Tagged
    11 Thread(s)

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

    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?
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  7. #7
    New Member
    Join Date
    Mar 2019
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

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

    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.

  8. #8
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,026
    Post Thanks / Like
    Mentioned
    52 Post(s)
    Tagged
    11 Thread(s)

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

    That should not happen. See here: https://support.microsoft.com/en-us/...-is-grayed-out

    Are you, perchance, in break mode?
    See here: https://www.mrexcel.com/forum/excel-...rayed-out.html
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •