Re: tab named after a cell contents



Hi Paul,

This will add a new tab for every value in a list starting in cell A1:

Sub createtabs()

Dim lastvalue As Integer
Dim currentrow As Integer
Dim master*** As String
Dim tabname As String

Range("A65536").Select
Selection.End(xlUp).Select
lastvalue = ActiveCell.Row
lastvalue = lastvalue + 1
currentrow = 1
master*** = Active***.Name

Do While lastvalue <> currentrow
Range("A" & currentrow).Select
tabname = ActiveCell.Value
Sheets.Add
Active***.Name = tabname
Sheets(mastersheet).Select
currentrow = currentrow + 1
Loop

MsgBox ("Complete")

End Sub

Please see the advice above for how to get it into VBA

Thanks,

Simon

Paul wrote:
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

--
Message posted via http://www.officekb.com

.