Results 1 to 4 of 4
  1. #1
    GeorgeJ is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    67

    Compiler won't accept "Excel.Application"

    I am trying to practice transferring data between Access 2013 and Excel 2013.

    I have the following code:
    Sub Test04()
    ‘Line below copied from VBA 2007 Programming Bible
    Dim AppExcel As Excel.Application
    End Sub

    Whenever I try to compile it I get an error saying “User defined type not defined”
    What do I need to add to my file to get it to accept this declaration?



    Thanks in advance

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    You need a reference to Excel 2013

    see this as example

  3. #3
    GeorgeJ is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Dec 2014
    Posts
    67
    Thanks. That works. The reference to Excel in the reference window was
    Microsoft Excel 15.0 Object Library

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Good stuff!
    Glad you have it resolved.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Compiler won't accept "Excel.Application"
    By GeorgeJ in forum Access
    Replies: 2
    Last Post: 12-03-2014, 06:44 PM
  2. Replies: 1
    Last Post: 04-23-2013, 08:35 AM
  3. Replies: 1
    Last Post: 03-14-2013, 12:39 PM
  4. "Stand alone" application
    By Hugo Pinto in forum Access
    Replies: 1
    Last Post: 08-10-2009, 01:13 PM
  5. Replies: 0
    Last Post: 09-25-2008, 12:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums