How to change a sheet name without opening the workbook

A

Andrew

Hello,
I am trying to figure out how, or if it is possible, to change the
name of the first sheet of each workbook in a folder. I have figured
out a way to do this by having a macro open each file, but this is
time consuming, AND, there is a macro in each workbook which tries to
run each time the workbook is opened. So, I would like to do this
without opening the files. Any ideas?

thanks,
Andy
 
G

GS

Andrew pretended :
Hello,
I am trying to figure out how, or if it is possible, to change the
name of the first sheet of each workbook in a folder. I have figured
out a way to do this by having a macro open each file, but this is
time consuming, AND, there is a macro in each workbook which tries to
run each time the workbook is opened. So, I would like to do this
without opening the files. Any ideas?

thanks,
Andy

You might be able to do this using ADO and SQL to rename a table since
ADO treats each worksheet in an Excel file as a table. You can download
working samples on how to work with closed files using ADO here:

http://www.appspro.com/conference/DatabaseProgramming.zip

HTH
 
A

Andrew

Andrew pretended :



You might be able to do this using ADO and SQL to rename a table since
ADO treats each worksheet in an Excel file as a table. You can download
working samples on how to work with closed files using ADO here:

 http://www.appspro.com/conference/DatabaseProgramming.zip

HTH

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

Thank you. I will look at some examples and see how this is done.

Andy
 
L

lifescholar

Thank you.  I will look at some examples and see how this is done.

Andy

If you are on Excel 2007/2010 you could also directly manipulate the
XML in the zipped xlsx file.
 

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