LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default Copy adjacent Sheet and name from a list


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.

Sheet "Main Swb" has some 'bells and whistles' color formatting, a few formulas and some 'merged cells" (big frown here). I need to keep all the goodies intact when copied and renamed.

So, I wind up with four copies of "Main Swb" with four different names.

I've tried to Set nSht = Sheets("Main Swb").Copy After:=Sheets(Sheets.Count)
but it errors out.

Thanks,
Howard

Option Explicit

Sub CreateSheets()
Dim nSht As Worksheet
Dim r As Integer
r = 9
Do While Sheets("Summary").Cells(r, 3).Value < ""
Set nSht = Sheets.Add
'Names for the new sheet are in C9:Cn of "Summary"
nSht.Name = Sheets("Summary").Cells(r, 3).Value
r = r + 1
Loop
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i have a list i need to copy onto another sheet one by one bigsister Excel Discussion (Misc queries) 2 March 25th 10 10:55 PM
find IDs in another sheet, copy paste non-adjacent data on orig sh Shariq Excel Programming 2 September 17th 09 06:10 PM
Copy Paste from Class Sheet to Filtered List on Combined Sheet [email protected] Excel Programming 6 September 16th 08 04:30 PM
When data match, copy adjacent value to adjacent column slimbim Excel Worksheet Functions 2 November 8th 06 08:41 PM
how to find and copy values on sheet 2, based on a list on sheet 1 evanmacnz Excel Programming 4 February 7th 05 08:33 PM


All times are GMT +1. The time now is 10:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"