Avatar of etech0
etech0
Flag for United States of America asked on

Access VBA export two queries to two worksheets in same excel file

Hi! I'm using this line of code to export a query to excel.
DoCmd.OutputTo acOutputQuery, "SalesRepMonthlyReport", acFormatXLSX, "c:\file.xlsx", true

Open in new window

I would like to export another query to the same Excel file, but in a different sheet.
Is that possible?

Thanks!
Microsoft Access

Avatar of undefined
Last Comment
etech0

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
peter57r

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
etech0

ASKER
Nice - thanks a million!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck