+ Reply to Thread
Results 1 to 2 of 2

Adding new Timesheet from a list

  1. #1
    Registered User
    Join Date
    07-08-2008
    Location
    Arkansas
    Posts
    32

    Question Adding new Timesheet from a list

    I am using the code below (Excel 2007) to delete and add back timesheets based on a list of names from the “Names” tab. In addition, I am making a “Table of Contents” with hyperlinks on a separate worksheet that will allow employees quick access to their timesheet without having to look at each tab. The code below works well if I want to delete and add back all the timesheet at one time but if we get a new employee in the middle of a pay period I have to use a single timesheet until the end of the pay period.

    What I would like to know is, can the code below be modified so that when the code is run it reviews the list of names and only adds a new timesheet for that employee without deleting and adding back all the timesheets?


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Adding new Timesheet from a list

    Hi OAM,

    See the attached workbook (written and tested in Excel 2003) based on your original code. It has macros to:
    a. Make the 'Names' Sheet visible (needed for testing).
    b. Delete all TimeSheets and add TimeSheets based on the 'Names' Sheet (existing capability). This also adds the capability of checking for 'duplicate names' on the 'Names' Sheet.
    c. Add TimeSheets from the 'Names' Sheet only if the TimeSheet does NOT exist.
    d. Sort the TimeSheets in ascending order.

    Please note that I created stub routines for 'DelSht() (I don't know what this is supposed to do) and 'CreateTableOfContents()'.

    There are command buttons on the 'Names' Sheet for items b. thru d. above.

    Lewis

    The code follows:
    Please Login or Register  to view this content.

+ 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] Taking new data from one list and adding it to another list via VBA
    By Michael D in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-11-2014, 06:47 PM
  2. Replies: 1
    Last Post: 06-09-2013, 08:07 AM
  3. [SOLVED] need a macro to loop thru names in a drop down list for a timesheet
    By radarzdc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-20-2012, 02:47 AM
  4. Timesheet issue adding hours
    By karmaimages in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2012, 05:08 AM
  5. Timesheet Hours not adding correctly in a Pivot Table
    By MarvinP in forum Excel General
    Replies: 12
    Last Post: 01-24-2011, 03:26 AM

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