Hi all,
I use this routine to export 2 queries to a single excel
worksheet but always overwrite in the sheet1 with a second
query below instead of having 2 sheets
Public Sub export()
DoCmd.OutputTo acOutputQuery, "qry - watchlistVP", acFormatXLS, "C:\temp\pme\pme_vb\watchlista.xls", 0
DoCmd.OutputTo acOutputQuery, "qry - watchlistVPMC", acFormatXLS, "C:\temp\pme\pme_vb\watchlista.xls", 0
End Sub
It means I want to have 2 sheets called qry - watchlistVP and qry - watchlistVPMC one after another.
Please assist to fix my routine or give some suggestions
how to solve this problem ?
TIA
I use this routine to export 2 queries to a single excel
worksheet but always overwrite in the sheet1 with a second
query below instead of having 2 sheets
Public Sub export()
DoCmd.OutputTo acOutputQuery, "qry - watchlistVP", acFormatXLS, "C:\temp\pme\pme_vb\watchlista.xls", 0
DoCmd.OutputTo acOutputQuery, "qry - watchlistVPMC", acFormatXLS, "C:\temp\pme\pme_vb\watchlista.xls", 0
End Sub
It means I want to have 2 sheets called qry - watchlistVP and qry - watchlistVPMC one after another.
Please assist to fix my routine or give some suggestions
how to solve this problem ?
TIA