Extract the name of the defined named tables inside an excel sheet to access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sally O Askar
    New Member
    • Nov 2010
    • 1

    #1

    Extract the name of the defined named tables inside an excel sheet to access

    Please help me,
    I am designing a small application that takes an excel sheet , this sheet contains my students marks inside a table named grade1.
    I want to import this table to my access table I use this command:
    DoCmd.TransferS preadsheet acImport, acSpreadsheetTy peExcel12, "Grade1A", varFile, True, "grade1A"

    but I dont want to put the name of the range " grade1A" , I just want access to retrive the name from the excel sheet, or open the excel sheet for the user and he selects the range to be imported.

    anyone can help me??

    thanks in advance
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Subscribing for now...

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      Sally, this is the manner in which I would handle this specific situation:
      1. Create a Table named tblResults with only two Fields:
        1. [Description] {TEXT} - Description of Range
        2. [Range] {TEXT} - Actual Range Address
      2. Create a Combo Box based on this Table, hiding the second Column (Cell Values in Range).
      3. In the AfterUpdate() Event of the Combo Box, pass the Range selected by the User to the TransferSpreads heet() Statement.
      4. Now that you have thoroughly memorized all this, simply Download the Attachment to see exactly what I am referring to.
      Attached Files

      Comment

      Working...