Consulting

Results 1 to 4 of 4

Thread: Tracking equipment run times with multiple starts/stops

  1. #1
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    4
    Location

    Tracking equipment run times with multiple starts/stops

    Hello,
    I have a large workbook which tracks samples through a process and creates shift reports based on that data. In the final portion of the project, I would like to be able to track equipment run times with multiple starts and stops throughout the shift. I have created a few macros to accomplish this however I am having trouble getting them to work correctly. I have uploaded my workbook to Dropbox and have prepared a lengthy description of how I am hoping the codes will work. I didn't have any vba experience before starting this project and have learned a great deal from forums such as this(Thank you all). This is the final piece of this project puzzle and I would like to see if anyone could take a look at my workbook and help me out. If you are interested please reply and I will forward a link to the Dropbox file and my description of the issues. Thank you

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    It'd be better to attach a workbook with data and macros to your post

    Only need enough data to see what the question is and to allow others to test
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    please attach the shared link to your drpbx.

  4. #4
    VBAX Newbie
    Joined
    Jan 2021
    Posts
    4
    Location
    Quote Originally Posted by arnelgp View Post
    please attach the shared link to your drpbx.
    https://www.dropbox.com/scl/fi/mxuoh...70zqqyk9d89fot

    Here is what is supposed to happen:
    1st- There is a code written in the Nucomat_Dashboard sheet which watches the value of cell “N4” and sets the start times of the units if they have samples loaded on them.(i.e. if “N4” = “Dayshift” and “N13” is >0 then the start time recorded in “AA2” should be 05:00.)
    2nd- There is a macro(LookatU5) which should look at the value of “N13” anytime samples are loaded and determine: If the unit was already running, then don’t do anything. If the unit was empty(i.e “N13” = 0, then insert the current time in cell “AA2” or the next empty cell in that range. Each of the 3 units has its own macro.
    3rd- There is a macro(Stopwatch_Units) which should look at the value of “N13” AFTER samples are scanned out(i.e removed from the units) and if “AA2>0” AND “N13=0” then insert the current time in the 1st empty cell in the appropriate named range(i.e. Named Range: U5Stop=”AB2:AB9”)
    4th-There is a macro(End_Runs) which should look at the value of “N13” and if the value is NOT 0 it should insert either “05:00” or”17:00” in the 1st empty cell in the named range(i.e U5Stop) which indicates that the unit is still running at the end of the shift.

    I am not sure that this is the best approach to take to accomplish this task. I am getting various error messages with each of the above mentioned codes. If you are interested in testing it for yourself, sample id’s can be copied from the “Received” tab using Column A data, and pasted into the log in or log out areas to simulate us actually using the workbook. Also, to log samples out you can paste the in using the LogOut area which can unload the units. From there you should be able to reproduce the issues I am having. The password is “Nuco123”. I GREATLY appreciate any help or words of wisdom on this. I am new to this and have learned a great deal from forums like this as

Posting Permissions

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