Results 1 to 3 of 3
  1. #1
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328

    Excel Commmunication Problem

    I am trying to use Access (both 2003 and 2007) in conjunction with an excel file. The plan is to send certain numerical data to excel, let excel make calcs based on the data, then bringing the data back into Access for reports and further calcs that are convenient to do in Access. I open the worksheet with:


    Set oWB = oXL.Workbooks.Open("\Path\ExcelFileName", , False
    oSheet = oWB.Sheets("SpinSadder") ' I added the False after reading someone else’s post.

    After updating certain cells, I import back with:
    oXL.Quit
    Set oRng = Nothing
    Set oSheet = Nothing
    Set oWB = Nothing
    Set oXL = Nothing

    DoCmd.TransferSpreadsheet acImport, 8, "ImportTableName",” Path", True, "WorksheetName!Range"
    Several worksheets are possible depending on which Access Form is being used.

    Sometimes, when I have both computers working with the excel file, I will get messages that the excel file is already open etc. Other indicators, (menu bar and task manager) don’t show it open. If I open it myself, it will claim to be read only or indicate that a copy is already open. This doesn’t happen every time, just enough to drive me crazy. Is what I am trying to do possible? Any help much appreciated.

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    I would do the calculation in Access.

  3. #3
    gg80 is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Posts
    328
    The excel sheet is a list of accesory options.. Each option has a value that is calculated from parameters sent to the worksheet by Access. The expression for each option can be unique. When imported to an access subform, a checkbox can choose a particular option and a quantity field will determine the final price. The subform total of the checked options times quantity is used by access in reports and other calcs. With my experience. I don't know how to do this practically in Access. I could end up with 60 or 70 fields.

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

Similar Threads

  1. Replies: 2
    Last Post: 06-14-2010, 03:25 PM
  2. Exporting to Excel Problem
    By octu in forum Import/Export Data
    Replies: 1
    Last Post: 04-14-2010, 11:28 PM
  3. VBA to open excel, import on close of excel
    By bdaniel in forum Programming
    Replies: 0
    Last Post: 03-20-2010, 02:45 PM
  4. excel to access problem
    By sahi0002 in forum Import/Export Data
    Replies: 0
    Last Post: 03-08-2009, 11:40 PM
  5. problem setting Excel sheet name in vba from a form
    By dataman in forum Programming
    Replies: 2
    Last Post: 04-18-2006, 07:26 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