PC Review


Reply
Thread Tools Rate Thread

How to copy worksheet template into multiple worksheets

 
 
Nelson
Guest
Posts: n/a
 
      10th Jun 2009
I have a main worksheet I have been working on which I am now ready to roll
out to multiple worksheets.

Using this VB I already created the sheets with the tab names I needed as
the tab names are customer numbers

Sub CreateSheetsFromAList()
Dim myCell As Range, MyRange As Range

Set MyRange = Sheets("RawData").Range("RawData!L:L")
Set MyRange = Range(MyRange, MyRange.End(xlDown))

For Each myCell In MyRange
Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet
Sheets(Sheets.Count).Name = myCell.Value ' renames the new worksheet
Next myCell
End Sub


Now I am trying to figure out how to incorporate the ability to copy the
contents of the main sheet into those worksheets with the VB that creates the
tabs.

Because the data will change I need to be able to update the workbook with
new customers and add the template for the same look and feel.

any suggestions .

Thanks

Any suggestions




--
Nelson
 
Reply With Quote
 
 
 
 
slarbie
Guest
Posts: n/a
 
      10th Jun 2009
Assuming the sheet you wanted to copy was named "template", why not just
replace your line:

Sheets.Add After:=Sheets(Sheets.Count)

with this instead?
Sheets("template").Copy After:=Sheets(Sheets.Count)


"Nelson" wrote:

> I have a main worksheet I have been working on which I am now ready to roll
> out to multiple worksheets.
>
> Using this VB I already created the sheets with the tab names I needed as
> the tab names are customer numbers
>
> Sub CreateSheetsFromAList()
> Dim myCell As Range, MyRange As Range
>
> Set MyRange = Sheets("RawData").Range("RawData!L:L")
> Set MyRange = Range(MyRange, MyRange.End(xlDown))
>
> For Each myCell In MyRange
> Sheets.Add After:=Sheets(Sheets.Count) 'creates a new worksheet
> Sheets(Sheets.Count).Name = myCell.Value ' renames the new worksheet
> Next myCell
> End Sub
>
>
> Now I am trying to figure out how to incorporate the ability to copy the
> contents of the main sheet into those worksheets with the VB that creates the
> tabs.
>
> Because the data will change I need to be able to update the workbook with
> new customers and add the template for the same look and feel.
>
> any suggestions .
>
> Thanks
>
> Any suggestions
>
>
>
>
> --
> Nelson

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Section of One Worksheet to Multiple Worksheets PHisaw Microsoft Excel Programming 7 16th Oct 2009 02:23 PM
Copy same cell in multiple worksheets onto one worksheet Tia Microsoft Excel Misc 1 17th Sep 2009 12:40 AM
Populate central worksheet template from multiple worksheets wcurtis Microsoft Excel Misc 0 24th Dec 2008 10:10 PM
how to copy data from one worksheet to multiple worksheets at once zeb Microsoft Excel Worksheet Functions 2 21st Oct 2008 07:25 PM
Copy Range From Multiple Worksheets to a Single Worksheet Dauntless1 Microsoft Excel Misc 5 17th Aug 2007 01:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 PM.