+ Reply to Thread
Results 1 to 2 of 2

Paste Template from one worksheet to multiple worksheets

  1. #1
    Registered User
    Join Date
    03-28-2014
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    13

    Paste Template from one worksheet to multiple worksheets

    Hi all,

    Seems to be some information out there for this but i'm still struggling :s

    I have one worksheet called "Template" which has some userforms, buttons, formulas and hyperlinks and then i have 200+ other worksheets which i created and named from a list using the below code:

    Sub CreateWorkSheetByRange()
    'create worksheets based on a range selected in a list in the same workbook

    Dim WorkRng As Range
    Dim Ws As Worksheet
    Dim arr As Variant
    On Error Resume Next

    Set WorkRng = Application.Selection
    Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
    arr = WorkRng.Value
    Application.ScreenUpdating = False
    For i = 1 To UBound(arr, 1)
    For j = 1 To UBound(arr, 2)
    Set Ws = Worksheets.Add(After:=Application.ActiveSheet)
    Ws.Name = arr(i, j)
    Next
    Next
    Application.ScreenUpdating = True
    End Sub


    What i would now like to do is copy and paste everything that is in the "Template" worksheet to all the other worksheets, including all formatting, buttons etc.. Also, if possible, for each of the worksheets i would like to insert a unique name in cell "A5" that is pulled from the same table as i selected from in the above code (note the names themselves are not the same).

    Any help appreciated.


    Stew

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Paste Template from one worksheet to multiple worksheets

    you only have to change those lines of code:
    Please Login or Register  to view this content.
    by those ones:
    Please Login or Register  to view this content.
    About the value you want to put in cell A5, I don't understand what you mean. Where are the values coming from?
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Copy Template Worksheet to Multiple Worksheets and Incrementally Number Sheets in Workbook
    By dingbat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-25-2014, 01:18 PM
  2. [SOLVED] Copy multiple worksheets data & paste into blank columns in summary worksheet
    By guest99999 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-21-2013, 09:56 AM
  3. [SOLVED] Search multiple worksheets for Text String, copy and paste entire row into new worksheet
    By spulliam2000 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-15-2013, 07:52 PM
  4. Copy data from multiple worksheets & paste into one worksheet.
    By Rodders in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-10-2012, 11:54 AM
  5. [SOLVED] Cut and Paste Data from Multiple Worksheets to One Worksheet
    By uknow message board in forum Excel General
    Replies: 2
    Last Post: 01-09-2006, 02:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1