View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Copy adjacent Sheet and name from a list

Hi Howard,

Am Sun, 7 Apr 2013 07:09:42 -0700 (PDT) schrieb Howard:

Code is in sheet "Summary" module.
This works fine as far as adding a number of sheet and naming them from the list C9:Cn on sheet named "Summary". There are four names and I get four regular sheets with those names.

What I want to do is COPY the sheet next to "Summary" which is named "Main Swb" and name the copies from the list in the "Summary" sheet C9:Cn.


try:

Sub CreateSheets()
Dim LRow As Long
Dim rngC As Range

With Sheets("Summary")
LRow = .Cells(Rows.Count, 3).End(xlUp).Row
For Each rngC In .Range("C9:C" & LRow)
ActiveWorkbook.Sheets.Add after:=Sheets(Sheets.Count)
ActiveSheet.Name = rngC
Next
End With
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2