• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

Saving Access query to Excel file on hard drive

I would ike to take an Access select query and have it write to an Excel file on my hard drive using VBA.  I'm not sure where to start.
  • 2
1 Solution
Dale FyeCommented:
marku24Author Commented:
hanks fyed, this worked really well.  I just have two questions, 1) when it copies to the excel sheet is there code that I can tell it to save that excel file to my hard drive?  Like FileSave C:Temp\Filename.xls? and 2) can I change a parameter and have it include the column headings from the Access query.  Right now it just skips the first row where the headings are suppose to go.  Thanks
marku24Author Commented:
This export worked.  I used
 wbk.SaveAs FileName:= "C:\temp\filename.xlsx"
to save the file to my drive.  

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now