PC Review


Reply
Thread Tools Rate Thread

How to change a sheet name without opening the workbook

 
 
Andrew
Guest
Posts: n/a
 
      9th Sep 2011
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
 
Reply With Quote
 
 
 
 
GS
Guest
Posts: n/a
 
      9th Sep 2011
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/Da...rogramming.zip

HTH

--
Garry

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


 
Reply With Quote
 
Andrew
Guest
Posts: n/a
 
      9th Sep 2011
On Sep 9, 8:59*am, GS <g...@somewhere.net> wrote:
> 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/Da...rogramming.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
 
Reply With Quote
 
lifescholar
Guest
Posts: n/a
 
      10th Sep 2011
On Sep 9, 10:09*pm, Andrew <andrewkgent...@gmail.com> wrote:
> On Sep 9, 8:59*am, GS <g...@somewhere.net> wrote:
>
>
>
>
>
>
>
>
>
> > 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/Da...rogramming.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


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

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a workbook to a certain sheet alpine7411@hotmail.com Microsoft Excel Programming 2 10th Sep 2007 08:06 PM
Change workbook sheet reference using cell A1 to change a vairable Reed Microsoft Excel Worksheet Functions 4 20th Jan 2005 07:15 PM
Opening workbook as sheet inside multi-sheet document Karl Microsoft Excel Misc 3 17th Aug 2004 09:28 AM
Opening a workbook on a set sheet foilprint0 Microsoft Excel Worksheet Functions 8 18th Feb 2004 04:01 PM
Opening a workbook on a specified sheet. Mike Microsoft Excel Worksheet Functions 4 2nd Jan 2004 02:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 AM.