Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I dir to remote computer in the network, I expected that some of the IP might not be able to access "error 52"
I just need to by pass if I can't connect to that remote computer and continue.
code is
Do until cells(x,1)=""
if dir(cells(x,1) aka IP_not_exit)<>""then
do something
end if
x=x+1
loop
An implementation of Visual Basic that is built into Microsoft products.
Try something like this:
Do Until Cells(x, 1) = ""
Dim result As String
On Error GoTo err1
result = Dir(Cells(x, 1))
On Error GoTo 0
If result <> "" Then
' do something '
End If
err1:
x = x + 1
Loop