Results 1 to 3 of 3
  1. #1
    stigmatized is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Riyadh, Saudi Arabia
    Posts
    17

    Create a linked table from excel using VBA


    Hello everyone. I am new in doing the VBA in access and here is my problem.

    I have 10 different sheets in a workbook and I want to make link the two sheets to my database which are sheet 1 and 10. In linking the sheet 1 i am using this code:

    DoCmd.TransferSpreadsheet acLink, , "Sheet1", "Workbook1", True

    i have noticed that this code, by default, is getting the first sheet of the workbook.

    Is there any way to put the Sheet name to be linked? My problem is how to link the Sheet 10 using vba.

    Hope that you can help me on this.

    Thanks.

    stigmatized

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664

  3. #3
    stigmatized is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Riyadh, Saudi Arabia
    Posts
    17
    thanks ssanfu.

    is it possible to put a specific range in the excel sheet to be linked e.g. "A6:AA10000" only. My objective is to get the heading to be my fields and it will help me to standardize the fields to be appended in my table.

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

Similar Threads

  1. Limit rows of linked excel table
    By FJM in forum Access
    Replies: 1
    Last Post: 06-15-2012, 02:43 PM
  2. Replies: 6
    Last Post: 05-16-2012, 12:43 PM
  3. Replies: 4
    Last Post: 01-05-2012, 08:31 PM
  4. Excel Linked Table not Updating
    By BillH in forum Import/Export Data
    Replies: 1
    Last Post: 06-09-2011, 08:37 AM
  5. Replies: 2
    Last Post: 08-22-2010, 07:59 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