View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Kubicki Mark Kubicki is offline
external usenet poster
 
Posts: 89
Default error number to determine if shared file is open on "this" machine

i've change the way a file is used: it is now shared...
so, this code which had been useful... no longer detects if a file is
currently open on "this" computer

what would the correct error number be?

Select Case errnum
' No error occurred.
' File is NOT already open by another user.
Case 0
IsFileOpen = False
' Error number for "Permission Denied."
' File is already opened by another user.
Case 70
IsFileOpen = True
' Another error occurred.
Case Else
Error errnum
End Select

thanks in advance
mark