+ Reply to Thread
Results 1 to 8 of 8

Copy values to template & creating new sheet

Hybrid View

riceordie Copy values to template &... 10-27-2007, 08:25 PM
riceordie forgot to add the worksheets 10-27-2007, 08:30 PM
royUK It shouldn't be difficut, but... 10-28-2007, 02:55 AM
riceordie Thank you so much for you... 10-28-2007, 03:19 AM
royUK I have added formulas to the... 10-28-2007, 01:53 PM
  1. #1
    Registered User
    Join Date
    10-27-2007
    Posts
    5

    Talking Copy values to template & creating new sheet

    Hello,

    I am trying to write a Macro or VBA code that will allow me to take data from a main page, copy it to a template, create a worksheet based on the completed template, and continue this process based on the amount of data listed on the main page.

    Basically the sheet contains the following data:
    Date
    Employee Name
    Register Number
    Area
    Over/Short Amount

    This information will then get transferred to the template, which is a Disciplinary Warning for an employee. Upon the template being completed, a worksheet will then populate & be renamed to the employees name.

    I have attached the spreadsheet that I am using.

    Any help would be greatly appreciated!

  2. #2
    Registered User
    Join Date
    10-27-2007
    Posts
    5
    forgot to add the worksheets
    Attached Files Attached Files

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    It shouldn't be difficut, but an example workbook would be better than the .txt files.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    10-27-2007
    Posts
    5

    Talking

    Thank you so much for you help with this. I greatly appreciate it. I was able to copy & rename one tab based on one line but I need to do this for many given lines. I would also like the Tabs to be named based on the employee name. If a given employee has more than 1 tab with his/her name, it should still name the tab based on the employee name but include a number(ie: employee#). Does that make sense? Thanks again!
    Attached Files Attached Files

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I have added formulas to the template to populate data from the main sheet based on the employee name which is input via the macro. The code also plases the concession etc. The sheet is reproduced & named with the employee's name a the date from main formatted as mmdd.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-27-2007
    Posts
    5
    Thanks so much for your help with this...

    Just one more thing:

    How would I add code that would detect a duplicate tab name? I opened up the file you gave me, added information to the main page and it would not allow me to create a new tab due to a duplicate tab name error (runtime error 1004).

    I don't understand why this would be happening since you added the date inclusion for the tab names, unless a person shows up twice on a given day.

    Thanks again for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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