+ Reply to Thread
Results 1 to 4 of 4

VBA code for adding a new sheet from a template

  1. #1
    Registered User
    Join Date
    02-20-2020
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    2

    VBA code for adding a new sheet from a template

    Hi all,
    I'm new to VBA coding but I found out I need one.
    I hope somebody can help me by providing a code.

    This is my situation:
    I have a workbook in which I add a new row with data. (sheet name is: Overview)
    Every time I add a new row, I would like to have a new worksheet (from a template I have in worksheet: Template)

    I will add some data in columns E-K starting at row 3. I don't know yet how many rows I will need.
    The sheet added should have the name that is equal to the data I have added in column 3. All names will be unique.
    It should not matter if the other columns have data or not.

    Is there somebody that can help me with this code?
    Do I need a command button, or can the code recognize that when a row is added, a new sheet needs to be added?

    Thanks in advance!!
    Yvet

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: VBA code for adding a new sheet from a template

    You said that sheet name has to be created based on data in col. 3 so I've set in col. C.

    Put it into sheet code:

    Please Login or Register  to view this content.
    p.s. If you mean col 3 as 3rd from col. E where you start typing data (means col. G) do change in highlighted place.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    02-20-2020
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    2

    Re: VBA code for adding a new sheet from a template

    Thank you so much!!
    It works perfectly

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: VBA code for adding a new sheet from a template

    Happy to help.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

+ 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 sheet to a new sheet with the code in the teimplate sheet
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-17-2018, 10:41 PM
  2. [SOLVED] Vba Code to generate a new sheet based on a template.
    By kdr2903 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-11-2015, 11:37 AM
  3. Macro to input new code into each template sheet
    By nickyo88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2014, 05:07 AM
  4. [SOLVED] Adding a searchbox and exporting data from a row to a new template (have existing code)
    By Gti182 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-09-2013, 06:45 AM
  5. [SOLVED] Need help with adding code for sequential numbering on an invoice template
    By chrissyl725 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2012, 12:20 AM
  6. Code to create copies of a 'template' sheet
    By Palaeontology in forum Excel General
    Replies: 6
    Last Post: 04-17-2010, 03:11 PM
  7. How I Apply a Excel Template in a new Sheet created in VBA Code??????
    By DjRoland in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2005, 01:34 PM

Tags for this Thread

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