+ Reply to Thread
Results 1 to 11 of 11

deactivating a cell after being idle for so long.

  1. #1
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    deactivating a cell after being idle for so long.

    Hi. i'm currently using the code from this link:http://excelribbon.tips.net/T008192_...nactivity.html to save and close a workbook after being idle for so long

    ..someone posed the question about active cells, but it wasn't addressed.

    so,
    is there a way to deactivate a cell after a certain amount of time?

  2. #2
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: deactivating a cell after being idle for so long.

    BUMP- please help

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: deactivating a cell after being idle for so long.

    You can probably use the same trick but you put it in a worksheet_selection_change event.
    If you need help doing this, let me know and I'll take a look.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  4. #4
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: deactivating a cell after being idle for so long.

    uhm, yes. I will need help doing that.

    also the code i'm using (the one posted in that link)... i'm not sure if its working correctly.
    I think its just running a timer from the start. the timer isn't stopping and starting like its supposed to.

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: deactivating a cell after being idle for so long.

    Here is a workbook that should work as you required.
    At the opening, the SetTimer macro is triggered and it is closed before you close the workbook.

    It is designed around Sheet2 and a range of cells.
    Actual timer is set to 1 minute.
    I programmed an UnLock button protected with a password being "Password".
    Cells being locked have their background color change to yellow when locked and green when unlock.
    There is one sheet event programmed to look at which cell is selected. It let you do a change if cells are unlocked or give you a message box if they are locked.
    Please Login or Register  to view this content.
    There are also some macros in a standard module to handle all of it.
    Please Login or Register  to view this content.
    And finally, there are those 2 macros in ThisWorkbook section to handle the opening and closing.
    Please Login or Register  to view this content.
    Hoping this will help you. At least, it can be a start.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: deactivating a cell after being idle for so long.

    This is all great but i'm afraid my question may not have been clear.. or perhaps i'm just interpreting your answer wrong.

    My issue was this:

    I was using that code from the link to set a timer for when a user has left a workbook open but is not using it.
    the time is supposed to start when no activity is being done, and stop once activity starts up again.

    the issue more specifically being that the timer would not start if a user was typing into a specific cell, didn't complete what they had been typing, left the cell in edit mode, and left the computer for an hour or so. The document has not made any changes in the past hour, but the computer is unable to start the timer since the cell is "active"

    I was looking for a solution to deactivate that cell after, lets say, 5 minutes.

  7. #7
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: deactivating a cell after being idle for so long.

    I have attached my workbook. perhaps this will help?
    the password, when prompted, is "MillSteel"
    Attached Files Attached Files

  8. #8
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: deactivating a cell after being idle for so long.

    Have you titled your thread "How to get Excel out of EDIT mode with VBA", you would have got the answer: "It is impossible".
    I tryed and look at lots of places and I got this same answer all the time.
    Sorry about that.

  9. #9
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: deactivating a cell after being idle for so long.

    HI,

    Check this site to see if it helps.

    http://vbcity.com/forums/t/42484.aspx

    Disregard post not what the user wanted
    Last edited by Charles; 06-29-2013 at 02:07 PM. Reason: Disregard
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  10. #10
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: deactivating a cell after being idle for so long.

    HI,

    Check this site to see if it helps.

    http://vbcity.com/forums/t/42484.aspx

    Disregard post not what the user wanted

    Thanks Charles!!

  11. #11
    Forum Contributor
    Join Date
    05-20-2013
    Location
    Ann Arbor, MI
    MS-Off Ver
    Excel 2010
    Posts
    255

    Re: deactivating a cell after being idle for so long.

    So,

    the macro ran good one time, and then another time I had an error message come up and say that excel cant run the macro 'shut down'

    or something to that sort. is there a way to avoid this?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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