Naming an Excel Spreadsheet from Access

J

Joe R.

Using code in Access I want to rename a Spreadsheet in an
Excel workbook.

I've tried the following code:

'where qryExcel is the name of the existing spreadsheet
Sheets("qryExcel").Name = "test"

and I get the error message below:

Runtime error 1004
Method 'Sheets' of object '_Global' failed

If anyone out there knows how to do this, I would
appreaciate some help.
 

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