Hello,
Well, I am back after my short-lived exhuberance with my other solution. I now have a problem with some of the users that have Excel 2003. I created everything, including their workbooks, in 2007. For some reason, my code works just fine to close the workbook after some time, but for some reason the file reopens. This causes an issue because my main workbook tries to pull data from those workbooks and it can't do that when they are open. The code that I used is below.
This is in ThisWorkbook
-----------------------------------------------------------------------------------------------------
Option Explicit
Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
ResetTimer
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ResetTimer
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
ResetTimer
End Sub
------------------------------------------------------------------------------------------------------
This is in the module
------------------------------------------------------------------------------------------------------
Public CloseDownTime As Variant
Public Sub ResetTimer()
On Error Resume Next
If Not IsEmpty(CloseDownTime) Then Application.OnTime EarliestTime:=CloseDownTime, Procedure:="CloseDownFile", Schedule:=False
CloseDownTime = Now + TimeValue("00:30:00") ' hh:mm:ss
Application.OnTime CloseDownTime, "CloseDownFile"
End Sub
Public Sub CloseDownFile()
On Error Resume Next
Application.StatusBar = "Inactive File Closed: " & ThisWorkbook.Name
ThisWorkbook.Close SaveChanges:=True
End Sub
------------------------------------------------------------------------------------------------------
Any assistance would be appreciated. This has got me stumped.
Thank you,
Josh

