PDA

View Full Version : CreateObject("InternetExplorer.Application")



clif
05-07-2015, 04:36 AM
the below code in old version excel and internet explore is work
but new version is not work, Why?



Sub Macro2()
'Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate "http://abc.aspx"
ie.Visible = True
While ie.Busy
DoEvents
Wend
ie.document.all("Name").Value = ThisWorkbook.Sheets("sheet1").Range("a1")
End sub

Can any help me? Thanks!

mancubus
05-07-2015, 06:33 AM
try replacing all with getElementById

clif
05-07-2015, 09:08 PM
document method problem iwebbrowser2 failed

clif
05-07-2015, 09:11 PM
Internet explore version 11.0.
Excel Version : Microsoft Excel 2010 14.0

clif
05-07-2015, 09:18 PM
133051330613304

Old version excel New version excel new version error

mancubus
05-08-2015, 12:55 AM
post your workbook. replace any sensitive info.

provide the link to web page.

do you want to login to some intranet or extranet page?

clif
05-08-2015, 02:20 AM
The real path need passwords. Someone say it is work under IE8.0 but not work after that version. :banghead:

jonh
05-08-2015, 02:31 AM
Test something simple.


Sub test()
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate "google.com"
While ie.Busy: DoEvents
Wend
ie.document.all("q").Value = "foobar"
End Sub

If that doesn't work, retest in a new blank workbook.
Don't add any references (CreateObject doesn't need them).

clif
05-16-2017, 06:25 PM
Set objIe = New InternetExplorerMedium

instead of

Set objIe = CreateObject("InternetExplorer.Application")