Dear All,
I am trying to parse some data from an Excel sheet to an IE page using VBA and I have difficulties in sending data to one object that look like a special combobox.
In fact there are 2 comboboxes on that particular page define as following:
- Combobox 1:
<selectname="material[]">
<optionvalue="3">AL</option>
<optionvalue="2">TL</option>
<optionvalue="1">GL</option>
- Combobox 2:
<divclass="ui-widget">
<selectname="partner" id="ID" style="width:300px">
<optionvalue="no"></option>
<optionvalue="3766">COMPANY 1</option>
<optionvalue="3792">COMPANY2</option>
<optionvalue="3764">COMPANY 3</option>
<optionvalue="3071">COMPANY 4</option>
While I can send the data to combobox 1 using the following code:
IE.document.all.Item("material[]").selectedIndex = "2"
it seems that the same code doesn't function on the second combobox:
IE.document.all.Item("partner").selectedIndex = "3766"
and no data is displayed (nor trigger any errors).
Do you have any ideas how could I accomplish this?
Thanks in advance for looking into this,
Adrian
I am trying to parse some data from an Excel sheet to an IE page using VBA and I have difficulties in sending data to one object that look like a special combobox.
In fact there are 2 comboboxes on that particular page define as following:
- Combobox 1:
<selectname="material[]">
<optionvalue="3">AL</option>
<optionvalue="2">TL</option>
<optionvalue="1">GL</option>
- Combobox 2:
<divclass="ui-widget">
<selectname="partner" id="ID" style="width:300px">
<optionvalue="no"></option>
<optionvalue="3766">COMPANY 1</option>
<optionvalue="3792">COMPANY2</option>
<optionvalue="3764">COMPANY 3</option>
<optionvalue="3071">COMPANY 4</option>
While I can send the data to combobox 1 using the following code:
IE.document.all.Item("material[]").selectedIndex = "2"
it seems that the same code doesn't function on the second combobox:
IE.document.all.Item("partner").selectedIndex = "3766"
and no data is displayed (nor trigger any errors).
Do you have any ideas how could I accomplish this?
Thanks in advance for looking into this,
Adrian