FoolzRailer
New member
- Local time
- Today, 21:45
- Joined
- Apr 15, 2016
- Messages
- 25
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.
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.
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.