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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top