Results 1 to 3 of 3
  1. #1
    Rick West is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    90

    Access to Excel


    I have 2 databases. I'll call "A" and "B".

    Database "A" has code that works so I copied it into database "B" and it does not work.

    The code line that is getting hung up in database B is "Dim wb As Workbook". Database B error is "User-defined type not defined". So I looked back in database A to see if I could find where they defined an excel workbook as a type - not there.

    What am I doing wrong?

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    In the VBA editor, go to Tools>References and add the Microsoft Excel reference

  3. #3
    Rick West is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    90
    You guys are the best.

    Keep it up please as we users really appreaciate the help.

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

Similar Threads

  1. excel link with access differs from simple export from access
    By M0RDANT in forum Import/Export Data
    Replies: 4
    Last Post: 03-25-2013, 02:43 PM
  2. IF in Excel VS IIF in Access
    By menonoting in forum Access
    Replies: 1
    Last Post: 09-18-2011, 05:04 PM
  3. import excel file to access 2003 yes, access 2007 no
    By stapik in forum Import/Export Data
    Replies: 9
    Last Post: 07-27-2011, 07:09 AM
  4. From Excel VBA to Access VBA
    By theracer06 in forum Programming
    Replies: 3
    Last Post: 09-08-2010, 08:41 AM
  5. Replies: 1
    Last Post: 08-31-2009, 10:24 AM

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