To get the next open file handle, you can use FreeFile. The FreeFile function will return an integer with the next file number available.
To see if one is open,
I think that works.Code:On Error Resume Next Open FileName For Input As TheOneYouWantToCheck If Err.Number = 70 Then MsgBox "in use" Else Close TheOneYouWantToCheck End If
Sunny




Reply With Quote