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") &
 
Back
Top