Auto Log out of shared Spreadsheets

DPChristman

Board Regular
Joined
Sep 4, 2012
Messages
171
Office Version
  1. 365
Platform
  1. Windows
I use a lot of shared spreadsheets for tracking activity of my field colleagues.

The user will open the spreadsheet, assuming no one else is not already in the spreadsheet, and enter their information.

Then when they are done, they (are supposed to) save and get out of the spreadsheet.

On a regular basis, the user will forget the get out of the spreadsheet, and no one can get in until they do.

Is there a way to have a forced close of the document after a certain period of time with no activity(ex: 15-20 minutes)?

I am thinking something like a macro, but it would be above my skill set.
 
I have noticed an issue lately with this function. Even if I am actively entering data, and there is no period of inactivity, the spreadsheet still saves and exits, sometimes while I am entering data.

This really only happens with me, because I am the only one who works on repairs and updates to the form.

Anything here I should be changing?
Dim CloseTime As Date
Sub TimeSetting()
CloseTime = Now + TimeValue("00:15:00")
On Error Resume Next
Application.OnTime EarliestTime:=CloseTime, _
Procedure:="SavedAndClose", Schedule:=True
End Sub
Sub TimeStop()
On Error Resume Next
Application.OnTime EarliestTime:=CloseTime, _
Procedure:="SavedAndClose", Schedule:=False
End Sub
Sub SavedAndClose()
ActiveWorkbook.Close Savechanges:=True
End Sub
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,215,034
Messages
6,122,782
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top