
!VB5: How to check status on a network sharename
Try:
Public Function DirExist(ByVal DirName As String) As Boolean
On Error Resume Next
DirExist = (GetAttr(DirName) And vbDirectory) <> 0
On Error GoTo 0
End Function
Now you can call
stFromDir="\\Nodename\sharename"
if Not DirExist(stFromDir) then
<my error message>
Quote:
>I try to use:
>stFromDir="\\Nodename\sharename"
>Dir(stFromDir, vbDirectory)
>if stDirCheck = "" then
> <my error message>
>If the share doesn't exist, I get the debug, End popup and not my error
>message.
>is there a better way than Dir() to check a status on a share?
>th