• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA in Excel "The remote server machine does not exist or is unavailable"

CR Anandan

New Member
'Getting error at code MyBrowser.Visible
'Error Msg "The remote server machine does not exist or is unavailable"
' Browser open but Program quits
'Below is the code:

Code:
Dim HTMLDoc As HTMLDocument
Dim MyBrowser As InternetExplorer
Sub MyGmail()

Dim MyHTML_Element As IHTMLElement

Dim MyURL As String
On Error GoTo Err_Clear

MyURL = "http://192.168.1.9:8000/rps/dcounter.cgi?CorePGTAG=13&Dummy=1578893780880"
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.navigate MyURL
MyBrowser.Visible = True


Do
Loop Until MyBrowser.readyState = READYSTATE_COMPLETE
Set HTMLDoc = MyBrowser.document
'HTMLDoc.all.Email.Value = "test@gmail.com"   'Enter your email id here
'HTMLDoc.all.passwd.Value = "tes@3" 'Enter your password here

MsgBox MyHTML_Element.Type

For Each MyHTML_Element In HTMLDoc.getElementsByTagName("input")
If MyHTML_Element.Type = "General User Login" Then MyHTML_Element.Click: Exit For
Next


Err_Clear:
If Err <> 0 Then
Err.Clear
Resume Next
End If
End Sub
 
Last edited by a moderator:
Back
Top