Noname > 03-10-10, 11:53 PM
Function IsFileOpen(FileName As String) As Boolean
Dim filenum As Integer 'truongphu
filenum = FreeFile()
On Error Resume Next
Open FileName For Input Lock Read As #filenum
Close filenum
Select Case Err
Case 0
IsFileOpen = False
Case 70
IsFileOpen = True
Case Else
End Select
End Function