Hello,
Was wondering if someone could help me modify some code? I would like to modify the VBA Sub below to automatically check the file back in if it is checked out for some period of time... say 2 hours? This would help eliminate the issue of someone checking out a file and forgetting to check it back in.
Sub CheckInOut(strWkbCheckIn As String)
' Determine if workbook can be checked in.
If Workbooks(strWkbCheckIn).CanCheckIn = True Then
Workbooks(strWkbCheckIn).CheckIn
MsgBox strWkbCheckIn & " has been checked in."
Else
MsgBox "This file cannot be checked in " & _
"at this time. Please try again later."
End If
End Sub
Thanks,
Matt
Bookmarks