PDA

View Full Version : internetexplorer from excel vba run time error 462



zulfahmi
08-21-2019, 01:59 AM
the code below is to open internet explorer from excel vba and browse ,but after setting navigate option the loop that loops until readystate_complete is achieved delivers a runtime error 462 message the remote server machine doesnot exist or is unavailable.
this message occurs even when you use latebinding technique and step through t6he code using f8 key and if i run the macro the error the object invoked has disconnected from its clients message occur . Please help in short description or code.



Sub wow()
Dim ie As SHDocVw.InternetExplorer


Set ie = New SHDocVw.InternetExplorer


ie.Visible = True
ie.Navigate "https://en.wikipedia.org/wiki/Main_Page"


Do While ie.ReadyState <> READYSTATE_COMPLETE
Loop


Debug.Print ie.LocationName, ie.LocationURL


ie.Document.forms("searchform").elements("search").Value = "cars"




End Sub

zulfahmi
08-21-2019, 04:04 AM
This code worked in office 2010 and office 2007 but both on windows 7.why not in windows 10 please help