Is there a way to make an open worksheet close itself if there is no activity on it for more than 5 minutes?
So for example: I work on a worksheet for a while then walk away for 20 minutes with said sheet open. Someone on the network requires to access the sheet but can’t because I’m on it.
I want it so that after me being away from my desk for more than 5 minutes the sheet will save itself and close out said sheet.
Is this possible? If so how? I can find scripts to show how to save and close a sheet, but I’ve yet to find one that uses a timer…
Ok, with the original answer below, I came up with my own, after a little more research.
Once you open the developer’s section you will find your sheets, place this code below into ThisWorkbook. That will allow your code to work through the entire sheet. I now it set up where there is a 10:00 minute initial timer, and a 05:00 minute timer if there is activity after the fact. You can change that to whatever you want.
The part below this needs to go into a newly created module, name it whatever you want, mine is called SaveWB
I changed the code from:
To what was above it.
The part I created works, the part that was originally posted works in closing but not saving. Do what you will with it, change it as you deem fit, but I am glad I got it working.