Sending a query to Excel via code

S

Stefan

I want to send a query from Access to Excel, using code,
where I can
determine to which directory and folder it shall go. I
also want to have the
possibility to name the excel-file to my own liking. Using
the button in the
tools menu sends the query to a predetermined folder and
using the name of
the query. This is no good for me. Would be very pleased
if someone has a
solution to this problem.

Stefan
 
L

LeAnne

Hi Stefan,

Code is not necessary. Instead of using the OfficeLinks tool button,
select File > Save As/Export. Select the "To an External File or
Database" radio button & click OK. The familiar "Save File As" window
will then open, enabling you to determine the preferred destination
folder & directory, name the file as you like, and even select which
version of Excel etc. you want the file saved as. To accomplish the same
action via code, use the TransferSpreadsheet Method.

hth,

LeAnne
 

Ask a Question

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.

Ask a Question

Top