• 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


  • 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:

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 = ""
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.navigate MyURL
MyBrowser.Visible = True

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

If Err <> 0 Then
Resume Next
End If
End Sub
Last edited by a moderator: