+ Reply to Thread
Results 1 to 7 of 7

Use of 'on time' to kick inactive users

  1. #1
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Use of 'on time' to kick inactive users

    A fairly hackneyed question this, with quite a lot of literature available on the web, but nothing that answers my specific question.

    I use the 'on time' function to kick users out of a shared workbook after 30 minutes of inactivity (i.e. no cells updated). Technically it works, as it does kick out the users.

    However the time after which it does so seems to bear no relation to the time I have instructed. Sometimes shorter, sometimes longer! If it is was always longer, I would be happy that there is an error in my code somewhere (i.e. the time value is resetting on an unexpected event that I need to find and alter). But shorter: that really stumps me.

    I'm sure it's something rather straightforward, but I'd be most grateful for any ideas!
    Last edited by TKCZBW; 04-16-2014 at 02:08 AM. Reason: Grammar error

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Use of 'on time' to kick inactive users

    probably if you show us the code, we may be able to help
    Click on the star if you think I helped you

  3. #3
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Use of 'on time' to kick inactive users

    I took the code verbatim from: http://excelribbon.tips.net/T008192_...nactivity.html, as prima facie it did exactly what I wanted with no tinkering. A fairly bad habit I know, to use code one doesn't fully understand!


    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Use of 'on time' to kick inactive users

    Quote Originally Posted by TKCZBW View Post
    Sometimes shorter, sometimes longer! If it is was always longer, I would be happy that there is an error in my code somewhere (i.e. the time value is resetting on an unexpected event that I need to find and alter). But shorter: that really stumps me.

    I'm sure it's something rather straightforward, but I'd be most grateful for any ideas!
    Only ideas that occur to me:
    Longer is due to the existing event procedures triggering without you realising. (Try putting a MsgBox in these event procedures while you are testing - then you can see whenever these events fire)
    Shorter is due to a workbook change that you don't have an event procedure already set up to reset the timer.
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  5. #5
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Use of 'on time' to kick inactive users

    For the 'longer', I agree.

    For the shorter, by the very nature of the NOW + ("00:30:00"), it shouldn't kick in anything before 30 mins after workbook open.

    Perhaps I should have made myself clearer, but I test it from a single changed cell immediately after workbook-open. Once I could get it to work from that, then I could ensure all the reset conditions function properly.

  6. #6
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Use of 'on time' to kick inactive users

    Quote Originally Posted by TKCZBW View Post
    For the shorter, by the very nature of the NOW + ("00:30:00"), it shouldn't kick in anything before 30 mins after workbook open.
    It wasn't clear from the OP. I thought that it closed on you less than 30 minutes after you triggered an event.

    Quote Originally Posted by TKCZBW View Post
    I test it from a single changed cell immediately after workbook-open. Once I could get it to work from that, then I could ensure all the reset conditions function properly.
    Hmmm. Maybe it wasn't the timer closing the WB, maybe it just crashed?!

  7. #7
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: Use of 'on time' to kick inactive users

    Nope, definitely the timer as I got it to run a message box before close, to make sure it wasn't an unrelated cause of closure.

    The plot thickens!

+ 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. Kick out Inactive users except in read only
    By StephanieLilly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2013, 02:16 PM
  2. Kick Access users out via Excel VBA
    By GeorgY in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2009, 02:22 PM
  3. Kicking Inactive users by auto closing workbook
    By ukphoenix in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-02-2008, 03:43 PM
  4. versions:Kicking Inactive users by auto closing workbook
    By Nyanko in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2007, 10:23 PM
  5. Kick Users Out of Sheet
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2007, 05:34 AM

Tags for this Thread

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