Export to excel in different tab

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Hi,

I have a few queries to export and I want to export it in
one Excel on a different worksheet.

eg. SQL1 on first tab and SQL2 on tab2 etc.

Does anynoe know how to do it?

Thanks
 
Rick,

You can use the DoCmd.TransferSpreadsheet method in VB code, or the
TransferSpreadsheet action in a macro. In both cases, one of the arguments
is Range. If you put a string there, the sheet in the workbook will be named
after it, and you can use the method / action repeatedly to export in the
same workbook, different sheet each time.

HTH,
Nikos
 
Back
Top