Results 1 to 5 of 5

Thread: Problems making VBA code to create start, pause & resume command

  1. #1

    Question Problems making VBA code to create start, pause & resume command



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello,

    I am using Excel 2007 to try and create a spreadsheet that tracks a person's time at work by using a series of start, pause and resume command buttons.

    When an employee starts I want to be able to press a start button that counts and shows in another cell the calendar weeks said employee has been working (so far I have only been able to get my start button to count the time in seconds not weeks!).

    I also need to be able to press a pause button if the employee is on holiday or sick that will stop the counting of the weeks until the employee returns to work, then I would like to be able to press the resume button to carry on counting the calendar weeks.

    I have tried everything I can think of and tried searching the web, but I can't find anything to help me. I'm not even sure any more if this can be done. I would be eternally grateful for any help you can give me as my brain now hurts from the past week of trying to do this!

    If I haven't made any sense, please feel free to ask for clarification!

    Thanks

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    Hi there,

    I don't understand why you're going VBA for this... This routine is going to run for weeks at a time?

    Why not track the start/end times in a simple Excel grid. You could then use a formula to work out your calendar weeks and sum them up. Would be a lot easier for someone to maintain later, and would avoid issues with someone forgetting to press the button too...
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    Or use a pencil and paper as I said in the thread he cross-posed at VBAExpress http://www.vbaexpress.com/forum/showthread.php?t=39223

  4. #4
    Cross-posted here as well http://www.excelforum.com/excel-prog...d-buttons.html, he is a busy boy

  5. #5
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,195
    Articles
    57
    Blog Entries
    14
    Wow... 7 minutes before cross posting?

    Shaun, you might want to have a quick read of this: http://www.excelguru.ca/forums/faq.p...osting_details
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Tags for this Thread

Posting Permissions

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