vba routine to export chnage to specific columns on a excel workbook template.
I have a query setup to export.
Set NewQuery = CurrentDb.CreateQueryDef("Export_Temp_Subform_Query", sql)
strUserName = Environ("username")
strPath = "C:\Users\" & strUserName & "\desktop\Export_Temp_Subform_Query.xls"
DoCmd.OutputTo acOutputQuery, "Export_Temp_Subform_Query", acFormatXLS, strPath, True
What I need:
To Specifically export to a Excel workbook.. called "Export_InPut_Data.xlslx"
I need Field(0) in the recordset to go to ColumnA in the workbook.
I need Field(1) in the recordset to go to ColumnB etc....
The cells on this workbook are FORMATTED exactly as i need them.
I'm hoping when the export is completed the formatting stays in place in the EXCEL workbook ?