Results 1 to 2 of 2
  1. #1
    Sciron is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    1

    Get/Link a specific field in Access to a specific cell in Excel

    Hello everybody,

    I've tried to find a solution how to get information from Excel to Access. As I'm new to this forum I haven't read every thread but so far i haven't found what i think I'm looking for.

    I work in a CAD software that uses an Access-database for it's Parts Database Manager. This db contains a lot of information for the specific part, like size, price, manufacturer and so on.
    As a standard we receive prices on parts in an Excel file. What I'd like to do, if it's at all possible, is to link to the parts price-field in the Access-db from the cell in the Excel-file that contains the price information.
    As a basic idea I think of the way you can, in Excel, link one cell in one file to another cell in another file and get a dynamic update.

    The basic reason is that some of the people that update the prices has NO knowledge about CAD or Access and therefor is this the best idea I can come up with.
    A type of lookup-function that gets the numbers in the Excel-file when the Access-db starts could be another solution.



    I'm not looking to import the whole file or create a new db or anything like that. But it has to be on a cell-level as it's not all cells thats going to be updated.

    Can this be done????

    Please help!

    Sincerely
    Thomas

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Yes but involves some vba coding...
    usage: txtbox = GetXlCellValue("c:\myfile.xls","sheet1","A14")

    Code:
    'REMEMBER YOU MUST ADD EXCEL IN VBE menu:  tools, references, Microsoft Excel xxx.x  object library
    
    Public Function GetXlCellValue(byval pvFile, ByVal pvSheet, ByVal pvCell)
    Dim XL As Excel.Application
    On Error Resume Next
    Set XL = CreateObject("excel.application")
    With XL
        .Visible = False
        .Workbooks.Open pvFile
        .Worksheets(pvSheet).Activate
         GetXlCellValue = Range(pvCell).Value
        
        .Quit
    End With
    End Function

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

Similar Threads

  1. Replies: 1
    Last Post: 10-28-2013, 12:32 PM
  2. Export Query to .ODS file starting at a specific cell
    By Baldeagle in forum Import/Export Data
    Replies: 4
    Last Post: 03-20-2013, 01:03 PM
  3. import specific cell from excel to access
    By maneuk in forum Import/Export Data
    Replies: 10
    Last Post: 07-01-2011, 06:24 AM
  4. Export a value to specific Excel cell
    By gg80 in forum Import/Export Data
    Replies: 5
    Last Post: 07-23-2010, 01:58 PM
  5. Hyperlink to a specific Field/Cell?
    By tbutters in forum Database Design
    Replies: 8
    Last Post: 06-04-2010, 12:27 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