Wardylewis
New Member
- Joined
- Jun 7, 2016
- Messages
- 37
Good Morning All,
I have been having issues with a shared sheet in terms ofpeople leaving it open on their desktop for hours on end and not using it.
I had found some code which worked and required a timer to bestarted upon opening the sheet and then the code below being placed in to amodule.
My issue is that whilst it works in its job of closing thesheet, it has had many other issues mainly around the ribbon and toolbarsfreezing and not functioning as the code was running all the time. It also doesn’tallow people to print as it keeps saying searching for printers.
I would have to manually break the code but didn't want totell everyone this as it then defeats the object.
Is there any way i can prevent this from happening.
Your assistance is greatly appreciated.
<!--[if !supportLineBreakNewLine]-->
Thanks Lewis
<!--[endif]-->
I have been having issues with a shared sheet in terms ofpeople leaving it open on their desktop for hours on end and not using it.
I had found some code which worked and required a timer to bestarted upon opening the sheet and then the code below being placed in to amodule.
My issue is that whilst it works in its job of closing thesheet, it has had many other issues mainly around the ribbon and toolbarsfreezing and not functioning as the code was running all the time. It also doesn’tallow people to print as it keeps saying searching for printers.
I would have to manually break the code but didn't want totell everyone this as it then defeats the object.
Is there any way i can prevent this from happening.
Your assistance is greatly appreciated.
<!--[if !supportLineBreakNewLine]-->
Code:
'Countdown for the save and close the sheet.
'Used for auto save and close after inactivity.
Const idleTime = 900 'seconds
Dim Start
Sub StartTimer()
Start = Timer
Do While Timer < Start + idleTime
DoEvents
Loop
Application.DisplayAlerts = False
ActiveWorkbook.Close SaveChanges:=True
Application.DisplayAlerts = True
End Sub
Thanks Lewis
<!--[endif]-->