G
Guest
My Database has some linked tables on another server. How can I check that
the server is available before 'running my other codes'?
Using the example below I can check a folder but really in this case I just
need to check the servername which does not work if I have varPath =
"\\myServer"
Is their a function to check the computername?
Should I verify the linked table connection another way?
Bruce
Sub test()
varPath = "\\myServer\Groups\Market"
MsgBox (FolderExists(varPath))
End Sub
Public Function FolderExists(varPath As Variant) As Boolean
On Error Resume Next
If Len(varPath) > 0& Then
FolderExists = (Len(Dir$(varPath, vbDirectory)) > 0&)
End If
End Function
the server is available before 'running my other codes'?
Using the example below I can check a folder but really in this case I just
need to check the servername which does not work if I have varPath =
"\\myServer"
Is their a function to check the computername?
Should I verify the linked table connection another way?
Bruce
Sub test()
varPath = "\\myServer\Groups\Market"
MsgBox (FolderExists(varPath))
End Sub
Public Function FolderExists(varPath As Variant) As Boolean
On Error Resume Next
If Len(varPath) > 0& Then
FolderExists = (Len(Dir$(varPath, vbDirectory)) > 0&)
End If
End Function