how to create an execl output from VBA code

  • Thread starter Thread starter ma
  • Start date Start date
M

ma

Hello,

I want to create an Excel like output from my code in VBA, How can I do
this? As I know there is a component to do this. What is it? I tried
flexgrid but it seems that I don't have license to use it. Is there any grid
like component that shipped with VBA for access?



Best regards
 
Here's the VBA code -
DoCmd.OutputTo acOutputQuery, "qryExport_NameOfQueryOrReport",
acFormatXLS, "c:\PathToSaveSpreadsheet" & Format(Date, "yyyymmdd") &
"NameOfFile.xls"

I like to include the date-created in my filename. If you don't need it,
just delete the section - & Format(Date, "yyyymmdd") &
 

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

Back
Top