Is there a way to have users "time out" of an Excel file?

RSW

Registered User.
Local time
Yesterday, 22:18
Joined
May 9, 2006
Messages
178
I have an Excel spreadsheet on a share drive that is used by many people.

I really don't want to share the spreadsheet, but at the same time I need to do something about the problem when users stay logged in to the spreadsheet and then others can't make any changes until they find the person logged in and get him or her to log out.

Is there a way that users can automatically be timed out of an Excel spreadsheet after a certain period of inactivity? Or is there some other solution I can consider?

Thanks in advance!
 
Yes you can include the timer...but it works well with Excel 2007..not sure about 2003...still give it a try.
This has to be done in VBA

Sub Timer()
Dim AlertTime as date
AlertTime=now+timevalue("0:00:05")
application.ontime AlertTime, Procedure: "closebook"
end sub

Sub closebook()
msgbox "you have been timed out. Click OK to save and close workbook", vbinformation+vbOKonly, "Timed Out..."
this workbook.save
this workbook.close
end sub

Here "0:00:05" is the timeout factor of 5seconds. You can change the value to your desired time limit.

This is not the exact code....

Have written as I remember the idea of getting it. Have not tried and tested it as I do not have Excel in the computer that am now.
Also, make sure there are no cell conflicts when multiple users are entering data...

Try out...!!

_________________________________________

Am not expert at anything...am a rookie at everything..!!
 
Last edited:
  • Like
Reactions: RSW
Great! Thank you very much!
 

Users who are viewing this thread

Back
Top Bottom