Hi everyone!
I am fairly new to VBA and HTML magic, I use the following code to choose from a combobox:
Option Explicit
Const sWebPage = "https://analytics.emea.teleperformance.com/ibmcognos/bi/"
Sub IEBot()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate sWebPage
While IE.ReadyState <> 4
DoEvents
Wend
Dim oHDoc As HTMLDocument
Set oHDoc = IE.document
Dim oHEle As HTMLSelectElement
Set oHEle = oHDoc.getElementById("main")
oHEle.selectedIndex = "1
End Sub
I get the Run-time error '438':
Object doesn't support this property or method.
Any help will be much appreciated!
I am fairly new to VBA and HTML magic, I use the following code to choose from a combobox:
Option Explicit
Const sWebPage = "https://analytics.emea.teleperformance.com/ibmcognos/bi/"
Sub IEBot()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate sWebPage
While IE.ReadyState <> 4
DoEvents
Wend
Dim oHDoc As HTMLDocument
Set oHDoc = IE.document
Dim oHEle As HTMLSelectElement
Set oHEle = oHDoc.getElementById("main")
oHEle.selectedIndex = "1
End Sub
I get the Run-time error '438':
Object doesn't support this property or method.
Any help will be much appreciated!