I am attempting to export mutliple queries to excel. Each query should be a separate tab in the worksheet. I can run each query and export from access by simply using the export function without issue, but when i try to run as code below sometimes it works and other times i get "external table not in expected format error". This error occurs on a different table each time. Can anyone help? I am very very new with vba...

Function Macro1()
On Error GoTo Macro1_Err
DoCmd.TransferSpreadsheet acExport, 10, "Export 1", "C:\Myfolder\DailyReport.xlsx", False, ""
DoCmd.TransferSpreadsheet acExport, 10, "Export 2", "C:\Myfolder\DailyReport.xlsx", False, ""
DoCmd.TransferSpreadsheet acExport, 10, "Export 3", "C:\Myfolder\DailyReport.xlsx", False, ""
DoCmd.TransferSpreadsheet acExport, 10, "Export 4", "C:\Myfolder\DailyReport.xlsx", False, ""
DoCmd.TransferSpreadsheet acExport, 10, "Export 5", "C:\Myfolder\DailyReport.xlsx", False, ""
Macro1_Exit:
Exit Function
Macro1_Err:
MsgBox Error$
Resume Macro1_Exit
End Function