Results 1 to 2 of 2
  1. #1
    mcucino is offline Advanced Beginner
    Windows 8 Access 2016
    Join Date
    Jul 2017
    Location
    Providence, RI
    Posts
    74

    DOcmd.Transferspreadsheet with a Table name

    I feel silly asking because this should be easy and I searched high and low and couldn't find a solution. I need to link my database to a table in my spreadsheet. The table is named in excel "LineItemsT".



    DoCmd.TransferSpreadsheet acLink, 10, "Test", DataFile, True, "LineItemsT"

    Every time I try to use a named range, I get run time error 3011 could not find the object 'LineItemsT'

    I tried just entering a static range to ensure that my datafile was correct, and it works fine if I sub in "A1:C15" in place of "LineItemsT"

    What am I doing wrong?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    I don't think Access can link to Excel table. I have no problem linking to a range name. Except first column is a number and link refuses to pull in that column header as field name.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Docmd.Transferspreadsheet
    By RayMilhon in forum Programming
    Replies: 5
    Last Post: 06-30-2017, 08:49 PM
  2. DoCmd.TransferSpreadsheet acExport Question
    By MTSPEER in forum Programming
    Replies: 5
    Last Post: 09-08-2016, 01:11 PM
  3. Replies: 11
    Last Post: 03-02-2016, 11:01 AM
  4. How do I use DoCmd.TransferSpreadsheet acExport
    By morerockin in forum Access
    Replies: 6
    Last Post: 09-24-2015, 03:28 PM
  5. Replies: 6
    Last Post: 10-17-2014, 07:58 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