+ Reply to Thread
Results 1 to 5 of 5

Advice on Non Active Userform triggering event

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Advice on Non Active Userform triggering event

    Hi Guys

    I need some advice on how to handle a specific issue...
    I have a system that logs work done by staff for specific Client functions during a day...
    Scenario as follows...
    Client phones in and needs something done...
    At that exact moment the User selects the client from Combobox1...A textbox is populated with actual time...
    After evaluating the client request, The user then selects the task from Combobox2

    After completing the client request, the user then pushes stop which logs the info to sheet, however, if nothing takes place within a prescribed time...i.e No movement on userform or no populating of data to sheet, I need Public commandButton code to be executed...

    I have tried placing activation.wait code within combobox2 but this did not work...

    Any ideas how one would handle this...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Advice on Non Active Userform triggering event

    You can make use of the OnTime method.

    Standard code module
    Please Login or Register  to view this content.
    Userform1 module. Form has label, textbox, listbox and button.
    Please Login or Register  to view this content.

    Show the form and press the button. If you do not enter the other controls within 3 seconds it will display timeout message.
    If when you show the form you press the button and then within 3 seconds enter the textbox the Still active message should display.

    You will need to reset the mLastActive variable for each control.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Advice on Non Active Userform triggering event

    Andy this is absolutely fantastic...Will implement into my form and am certain it will work well...

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Advice on Non Active Userform triggering event

    Hi Andy

    I have implemented your code...fantastic...Only one hiccup i can't figure out...I have attached my file for your perusal...
    Would you be so kind and check the following for me...Think I am missing a reset somewhere...

    On opening the userform pops up...

    User selects a Client
    User selects a Activity...Now your implemented code activates...My setting will be 10 min...currently 5 seconds
    After time period, the info is written to sheet and a message box pops up...Form clears and becomes ready for new activity

    Another use is as follows:

    User selects Client then selects activity...now a phone rings and user must answer...he then selects a new client, code then automatically populates sheet and prepares for next activity selection....If no activity...your code runs...

    If user finishes activity he selects stop which populates sheet...Form clears and prepares for next client...Unless he does nothing then your code runs...

    Somewhere between user selecting a new client something is not resetting as it runs code that checks for empty activity box...I just get figure out where...If you have a moment, pls be so kind and see what I am missing...
    Attached Files Attached Files

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,176

    Re: Advice on Non Active Userform triggering event

    Not to worry Andy...Found my error...Had to add red part...
    Tx again...much appreciated...
    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. Triggering an event in a csv file
    By mediaeval in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-06-2017, 12:01 PM
  2. Need Help with Event Triggering when value changes
    By calvinloo in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-12-2015, 03:54 AM
  3. EVENT triggering?
    By EXLent in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 08-19-2014, 07:16 AM
  4. Event triggering
    By Sarimdesert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2014, 03:26 AM
  5. VBA Event triggering
    By teachMeExcel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2012, 02:12 PM
  6. ComboBox_Change Event Not Triggering
    By yay_excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-29-2011, 02:22 PM
  7. Triggering an event from a cell
    By krabople in forum Excel General
    Replies: 4
    Last Post: 12-08-2006, 04:27 PM

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