Re: tab named after a cell contents



Paul, here is one way,

Sub Rename_All_Sheets()
'will rename all sheets in the workbook to the value in A1
Dim WS As Work***
For Each WS In Worksheets
WS.Name = WS.Range("A1").Value
Next
End Sub

To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is at the top-left of the spread*** this will
open the VBA editor, in Project Explorer click on your workbook name, if you
don't see it press CTRL + r to open the Project Explorer, then go to insert,
module, and paste the code in the window that opens on the right hand side,
press Alt and Q to close this window and go back to your workbook and press
alt and F8, this will bring up a box to pick the Macro from, click on the
Macro name to run it. If you are using excel 2000 or newer you may have to
change the macro security settings to get the macro to run. To change the
security settings go to tools, macro, security, security level and set it to
medium

And if you are new to macros you may also what to have a look here on
getting started with macros
http://www.mvps.org/dmcritchie/excel/getstarted.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"Paul" <ph002d2907@xxxxxxxxxxxxxxxx> wrote in message
news:wRzWg.32350$r61.11880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I'm a teacher with a class of 30+ children. I want to keep an individual
work*** for each child but don't want to have to type in their names to
each tab. I would like to either 1) have a simple class list on the first
tab and then each subsequent tab named from that list, or 2) from a
particular cell on each individual work***. I'm an average user of excel
2003 but have no knowledge of VBA.
Hope you can help




.


Loading