Results 1 to 2 of 2
  1. #1
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Oct 2009
    Posts
    39

    Transfer Spreadsheet

    I am using the following code to export a access table to a spreadsheet.

    Code:
    Function Macro11()
    On Error GoTo Macro11_Err
        DoCmd.OpenQuery "spreadsheet1", acViewNormal, acEdit
        DoCmd.TransferSpreadsheet acExport, 8, "qryprodsheet", "C:\Documents and Settings\dr18965\My Documents\shortage.xls", False, ""
    
    Macro11_Exit:
        Exit Function
    Macro11_Err:
        MsgBox Error$
        Resume Macro11_Exit
    End Function
    It opens a make table query then send that table to the spreadsheet. Problem is that it creates a new sheet in the work book instead of just adding the data. Is there a way to force it to use only one sheet? I did this in access 2003 but have since lost that code. This is being done in access 2010.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    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. Replies: 1
    Last Post: 03-05-2012, 04:21 PM
  2. Information transfer
    By tomclavil in forum Forms
    Replies: 5
    Last Post: 02-07-2011, 05:41 AM
  3. Button Command to Transfer Spreadsheet
    By diane802 in forum Programming
    Replies: 3
    Last Post: 02-10-2010, 09:26 AM
  4. Transfer SpreadSheet Command and Rename
    By fintan06 in forum Import/Export Data
    Replies: 2
    Last Post: 10-15-2009, 08:00 AM
  5. File path name using Transfer spreadsheet
    By JohnN in forum Import/Export Data
    Replies: 0
    Last Post: 11-14-2005, 06:57 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