Function IsFileOpen(ByVal tFile As String) As Boolean
On Error GoTo IsOpen
Dim fFile As Integer
fFile = FreeFile()
Open tFile For Input Lock Read Write As fFile
Close fFile
Exit Function
IsOpen:
Resume Leave
Exit Function
Leave:
On Error Resume Next
IsFileOpen = True
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.