+ Reply to Thread
Results 1 to 5 of 5

need a macro to loop thru names in a drop down list for a timesheet

  1. #1
    Registered User
    Join Date
    11-17-2012
    Location
    Northern Virginia
    MS-Off Ver
    Excel 2010
    Posts
    3

    need a macro to loop thru names in a drop down list for a timesheet

    timesheets.xls


    see attached file

    I need to print several timesheets, each with a different name and employee ID number that can be found in a drop down list and table.

    can somebody teach me the vba code to make that happen?

    any help is appreciated!

    thanks,

    radarzdc

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: need a macro to loop thru names in a drop down list for a timesheet

    Copy and paste this code in a regular module.
    Please Login or Register  to view this content.
    Click on your colorful picture to run the code. After you have tested it, remove the PrintPreview line and delete the apostrophe that is in front of the Activesheet.Printout line.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-17-2012
    Location
    Northern Virginia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: need a macro to loop thru names in a drop down list for a timesheet

    Dave,

    Worked perfectly. But when I merged 2 cells, it stopped working! Can you help again?

    Thanks for the help!

    radarzdc
    Last edited by radarzdc; 11-19-2012 at 07:24 PM. Reason: As per Forum Rule #12, don't quote whole posts unless necessary-- it's just clutter.

  4. #4
    Registered User
    Join Date
    11-17-2012
    Location
    Northern Virginia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: need a macro to loop thru names in a drop down list for a timesheet

    here is the file that doesn't work...what did i do wrong in the macro??
    Attached Files Attached Files

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: need a macro to loop thru names in a drop down list for a timesheet

    Column O is column 15 not column 29. Change 29 to 15

+ 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