macro to create a worksheet for every name on a list?
Thank you! I have been using it. It does creates a second example sheet,
example sheet(2) and the debugger kicks in because of two sheets having the
same name. But it works.
Todd
"Tom Ogilvy" wrote:
Sub CreateSheets()
Dim cell As Range, rng As Range
With Worksheets("Supplier List")
Set rng = .Range(.Range("A25"), .Range("A25").End(xlDown))
End With
For Each cell In rng
Sheets("ExampleSheet").Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = cell.Value
Next
End Sub
--
Regards,
Tom Ogilvy
"Todd" wrote in message
...
I am making worksheets for each name on a list and would like to have a
macro
that can do that. I created an example sheet to copy and I recorded this
macro but I don't know how to select names from a defined list and to get
it
to keep creating new sheets for each name.
Can someone help?
TIA
Todd
Sub CreateSheets()
Sheets("ExampleSheet").Select
Sheets("ExampleSheet").Copy Befo=Sheets(18)
Sheets("ExampleSheet (2)").Select
Range("C21").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("Supplier List").Select
Range("A25").Select
Selection.Copy
Sheets("ExampleSheet (2)").Select
Sheets("ExampleSheet (2)").Name = "Cutler Hammer "
Range("D20").Select
End Sub
|