Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / February 2007

Tip: Looking for answers? Try searching our database.

Auto renaming of Worksheets?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Mitchell - 22 Feb 2007 14:47 GMT
What I want to do is set up a Workbook with Sheets N01 - N30, and have an
index Sheet such that when N01 in the index is overtyped with 'Fred'
Worksheet N01 is renamend 'Fred'.  This way I can set up formulae etc which
will auto update as and when Sheet names are updated.  Is this possible?

An earlier reply by Bondi (Thanks Bondi) pointed to
http://www.ozgrid.com/Excel/variable-worksheet-names.htm, but either I'm not
reading this right or it's not quite what I need.

TIA.

Chris.
Don Guillett - 22 Feb 2007 15:05 GMT
If you used the macro I provided to get an index and you had a title in row
1 then

Sub listsheets()
For i = 1 To Worksheets.Count
 Cells(i + 1, "a") = Sheets(i).Name
Next i
End Sub

right click sheet tab>view code>insert this. A change to the listed name
will now chg the sheet name.
I would run my original macro before in case you have moved sheets.

Private Sub Worksheet_Change(ByVal Target As Range)
 If Target.Column <> 1 Then Exit Sub
Sheets(Target.Row - 1).Name = Target
End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> What I want to do is set up a Workbook with Sheets N01 - N30, and have an
> index Sheet such that when N01 in the index is overtyped with 'Fred'
[quoted text clipped - 9 lines]
>
> Chris.
Chris Mitchell - 22 Feb 2007 15:14 GMT
Thanks Don.

Our most recent posting must have passed each other in the ether.

> If you used the macro I provided to get an index and you had a title in
> row 1 then
[quoted text clipped - 27 lines]
>>
>> Chris.
Don Guillett - 22 Feb 2007 15:33 GMT
You really should stay in the ORIGINAL thread. Send me (address below) your
workbook if you like.

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> Thanks Don.
>
[quoted text clipped - 31 lines]
>>>
>>> Chris.
Chris Mitchell - 23 Feb 2007 10:15 GMT
Thanks for the offer Don, I've sent the file to you.

> You really should stay in the ORIGINAL thread. Send me (address below)
> your workbook if you like.
[quoted text clipped - 34 lines]
>>>>
>>>> Chris.
Don Guillett - 23 Feb 2007 15:00 GMT
File returned to Chris with desires

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 3 Or Target.Column <> 2 Then Exit Sub
On Error Resume Next
Application.EnableEvents = False
Sheets(Target.Row).Name = Target
Application.EnableEvents = True
End Sub

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> Thanks for the offer Don, I've sent the file to you.
>
[quoted text clipped - 36 lines]
>>>>>
>>>>> Chris.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.