Eport to Excel but prompt for file name in which to save as

CTQE

Registered User.
Local time
Today, 15:44
Joined
Feb 27, 2008
Messages
48
Hello All,
I am interested for my query result to be exported to an Excel file.
What code is required to prompt the user to define a file name.

There are multiple people in this DB & multiple PCs so a defined file name or location is not possible.

Thanks in advance
 
I wonder if using 'docmd.transferspreadsheet' in vba code with an inputbox() function's results (variable) in the new file name argument would get you there??/
 
I wonder if using 'docmd.transferspreadsheet' in vba code with an inputbox() function's results (variable) in the new file name argument would get you there??/

That would be unwieldy.

I like using this one because you don't need a reference set. But you can use the FileSystemObject as well without references if you use late binding. I just can never remember the code. There are examples here on the forum if you do a search.
 
That would be unwieldy. .

Yes it would, as there are much better workarounds. I would personally use a form, the fso and a submit button to do the job so I hope the OP can spark some ideas out of our two posts.
 

Users who are viewing this thread

Back
Top Bottom