Results 1 to 2 of 2
  1. #1
    FoolzRailer is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2015
    Posts
    51

    TransferSpreadsheet with prompt for file location

    Hello



    I'm trying to Export 2 queries into one Excel file, in two different sheets. I can get this to work, by calling the below code in a macro.

    Code:
    Public Function Export2Queries()
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "Concatenate", "C:\Users\Username\Desktop\ExportTest.xlsx", True
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "SaneringTilImport", "C:\Users\Username\Desktop\ExportTest.xlsx", True
    End Function
    I would like to get a prompt for the file location, instead of hardcoding it. I'm using Access 2010 64-bit.

    Any help would be much appreciated.

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430

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

Similar Threads

  1. Replies: 15
    Last Post: 12-31-2015, 02:26 PM
  2. Importing Excel file: ADODB, DAO or DoCmd.TransferSpreadsheet
    By Monterey_Manzer in forum Import/Export Data
    Replies: 3
    Last Post: 08-13-2013, 11:34 AM
  3. Replies: 4
    Last Post: 11-09-2011, 08:40 AM
  4. Replies: 2
    Last Post: 02-27-2010, 06:53 AM
  5. Replies: 1
    Last Post: 03-25-2009, 02:20 PM

Tags for this Thread

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