Chrissirhc
Programmer
Hi I have this code that checks whether a file exists:
Dim fso As Scripting.FileSystemObject
Set fso = New Scripting.FileSystemObject
fileExists = True
If fso.fileExists(fileNameLocation) = False Then
fileExists = False
End If
The problem is, I'll try to open the file if it exists, but sometimes a user may be able to see the file, but won't have read access to it. How can I check whether they have read access without actually workbooks.open??? (I need to use a standardised way to open the file... I shouldn't use workbooks.open)
Thanks,
Chris
Dim fso As Scripting.FileSystemObject
Set fso = New Scripting.FileSystemObject
fileExists = True
If fso.fileExists(fileNameLocation) = False Then
fileExists = False
End If
The problem is, I'll try to open the file if it exists, but sometimes a user may be able to see the file, but won't have read access to it. How can I check whether they have read access without actually workbooks.open??? (I need to use a standardised way to open the file... I shouldn't use workbooks.open)
Thanks,
Chris