There might be a case where we have to connect to remote
computer. In such case, before connecting to the remote computer, How to confirm remote computer is available or not?
Dim oNetwork 'Creating Visual Basic Network object Set oNetwork=DotNetFactory.CreateInstance("Microsoft.VisualBasic.Devices.Network" ,"Microsoft.VisualBasic") 'Ping method returns True, if remote computer is available. If oNetwork.Ping("192.01.01.01") Then Msgbox "Available" Else Msgbox "Not Available" End If Set oNetwork=Nothing
We can also ping with URL or computer name.