' Open Invoice File
MyInvoiceFile = "W:\USERS\INVOICE #2002.xls"
Set MyWorkBook = Workbooks.Open(MyInvoiceFile)
' Check to see if file is already open
If MyWorkBook.ReadOnly Then
ActiveWorkbook.Close
MsgBox "Cannot update Invoice Log, someone currently using file. Please try again later."
Exit Sub
End If
Ret = IsWorkBookOpen(Wherwithal & "\" & wkbkname)
If Ret = True Then
MsgBox "The " & wkbkname & " is open." & vbCrLf & _
"Please update it later."
Exit Sub
End If
......Code:Ret = IsWorkBookOpen(Wherwithal & "\" & wkbkname)