Results 1 to 2 of 2
  1. #1
    mkc80 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    56

    Range doesn't work during TransferSpreadsheet action in a macro (Access 2007)

    I am trying to export the result of two different queries in to the same sheet (say Sheet1) in a Excel workbook.
    Each of the query results in two columns.

    Here are the Action arguments I have:


    Transfer Type: Export
    Spreadsheet Type: Excel Workbook
    Table Name: Query Name
    File Name: ..\...\Book1.xlsx
    Has FieldName: Yes
    Range: Sheet1!A2:B200

    I get an error stating that its not a valid name, make sure it does not contain invalid characters or punctuation and that it is not too long.

    I have tried giving just the range A2:B500 for query1 and D2500 for query2, but I get 'Table A2:B500 already exists and get nothing when Book1.xlsx is created.

  2. #2
    TG_W is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Can you build one query to combine the two you want to export? If not, you can export both out into the same workbook and feed a third worksheet in the format you want.

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

Similar Threads

  1. 2007 to 2010 macro won't work
    By lmnnt in forum Programming
    Replies: 6
    Last Post: 08-10-2011, 01:55 PM
  2. Macro Action
    By Bakar in forum Forms
    Replies: 1
    Last Post: 01-05-2011, 12:38 PM
  3. Access 2007 doesn't show Stored Procedure option
    By DistillingAccess in forum Programming
    Replies: 0
    Last Post: 08-03-2010, 03:19 AM
  4. 2007 doesn't work in Windows 7
    By InvGrp in forum Access
    Replies: 2
    Last Post: 05-24-2010, 03:23 PM
  5. Can't get TransferSpreadsheet to work
    By Valeda in forum Import/Export Data
    Replies: 0
    Last Post: 07-19-2007, 08:04 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