Hi I have a problem with a combobox on a page. I use Webbrowser control to navigate to a page and there I have to fill some fields.
I use:
But on that page I have combobox also defined like this:
How can I set wich option to be chosen because if I use:
or
I get the error "Object doesn't support this property or method"
If it's true that we are here to help others, then what exactly are the others here for?
I use:
Code:
Dim doc As HTMLDocument
Dim elem As HTMLInputElement
Dim frm As HTMLFormElement
Set doc = wbIE.Document
Set frm = doc.Forms(0)
'set username
Set elem = frm.Item("username")
elem.Value = txtField(0).Text
But on that page I have combobox also defined like this:
Code:
<SELECT SIZE=1 NAME=trait>
<OPTION VALUE=1>Option1
<OPTION VALUE=2>Option2
<OPTION VALUE=3>Option3
<OPTION VALUE=4>Option4
<OPTION VALUE=5>Option5
</SELECT>
How can I set wich option to be chosen because if I use:
Code:
Set elem = frm.Item("trait")
elem.Value = "Option1"
Code:
Set elem = frm.Item("trait")
elem.Value = 1
If it's true that we are here to help others, then what exactly are the others here for?