Hallo, I am trying to check if the file is locked by another user. File is located online : "https://my.sharepoint.com/personal/jhofmann/documets/ForecastEurope.xlsx"
I checked with code like this
Function isworkBookOpen( Filenam as string)
Dim ff as long, errno as string
On error resume next
ff=Freefle()
open filename for input lock read as #ff
close ff
errno = Err
On Error go to 0
Select case Errno
Case 0: IsWorkbookopen = False
Case 70: IsWorkBookopen = True
Case Else: Error Errno
End Select
End function
And it always gives me error 52,not 70. Cannot find the error
I checked with code like this
Function isworkBookOpen( Filenam as string)
Dim ff as long, errno as string
On error resume next
ff=Freefle()
open filename for input lock read as #ff
close ff
errno = Err
On Error go to 0
Select case Errno
Case 0: IsWorkbookopen = False
Case 70: IsWorkBookopen = True
Case Else: Error Errno
End Select
End function
And it always gives me error 52,not 70. Cannot find the error