Code:
DoCmd.OutputTo acOutputQuery, "Q_3_Monthly_LC", acFormatXLS, txt, False,
i tried to use this code but it is also not working
Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "Q_3_Monthly_LC", txt, False
DoCmd.OutputTo acOutputQuery, "Q_3_Monthly_LC", acFormatXLS, txt, False,
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "Q_3_Monthly_LC", txt, False
MsgBox "Please, close b_all.xls file (Excel spreadsheet).", vbCritical, "File open"
MsgBox Err.Number & " " & Err.Description & ". Please, close b_all.xls file (Excel spreadsheet).", vbCritical, "File open"
DoCmd.TransferSpreadsheet, acSpreadsheetTypeExcel9, "Q_3_Monthly_LC", "PathAndFileName.xls", True
Comment