I know this may not enough information but this could become pretty complex. Here is what I created. I have two Userform Buttons on my worksheet which fills out a spreadsheet with whatever the user enters. Everything works great (thanks to some people on this board ). Now my issue lies in the people using the forms. They never close out of the sheet so everyone else is seeing the Read Only message. To resolve this I found the below code on the web. It does what it is created to do but it is affecting my Userforms. Can you determine what part of the code below could affect the way my Userforms work? Is there another way to close the application after a certain idle time?
If you need more info I can supply it.
In Thisworkbook -- insert code section
Private Sub Workbook_Open()
StartTimer
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
StartTimer
End Sub
In ThisWorkbook -- Module
Const idleTime = 900 'seconds
Dim Start
Sub StartTimer()
Start = Timer
Do While Timer < Start + idleTime
DoEvents
Loop
Application.DisplayAlerts = False
ActiveWorkbook.Close True
Application.DisplayAlerts = True
End Sub
thank you
If you need more info I can supply it.
In Thisworkbook -- insert code section
Private Sub Workbook_Open()
StartTimer
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
StartTimer
End Sub
In ThisWorkbook -- Module
Const idleTime = 900 'seconds
Dim Start
Sub StartTimer()
Start = Timer
Do While Timer < Start + idleTime
DoEvents
Loop
Application.DisplayAlerts = False
ActiveWorkbook.Close True
Application.DisplayAlerts = True
End Sub
thank you