Here's a quick-and-dirty solution using InputBox. (It supplies a default
path/name, but it's just a default, the user can change it). For a more
sophisticated, robust, and user-friendly solution, you could replace the use
of InputBox with the Windows Open File dialog - see the code at the URL
below ...
Public Sub TestSub4()
Dim strPathName As String
strPathName = InputBox("Where do you want to save the file?", _
"Save Where?", CurrentProject.Path & "\Test.xls")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "tblTest",
strPathName
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.