Rename Sheet on Transfer to xls

S

Steven

When I run this command:

DoCmd.TransferSpreadsheet acExport, 8, "Batch05", "C:\My
Documents\A-ExportBatch", True, ""

The worksheet in the created xl file will be named Batch05
when I want it to be named Sheet1. How can I get this
code to name the worksheet Sheet1.

Thank you,

Steven
 
N

Nikos Yannacopoulos

Steve,

The last argument in your expression (empty quotes) are
for the Sheet name! Just end it with "sheet1" instead
of "" and you've got it.

Nikos Y. (nyannaco at in dot gr)
 
Top