Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42243

Filling an Onchange Combobox [+HELP]

$
0
0
Hello,



I am filling this form on a Intranet website that has textboxes and comboboxes.
The code is working fine until now.


However, there is a combobox that "depends" on another combobox.
That is, the second combobox is activated after the first one has an option selected. Through researches, I think it's a Combobox Onchange . Not sure, please correct me if I am wrong.

The thing is, I am being able to populate the first combobox, but the second one does not present any options besides "Select". Even after running the Macro, if click manually in the second combobox, it does not show any options but Select in the list.


How can I choose an option from a Onchange Combobox ?



Here's my code so far..


Code:


 
Sub AcessaPagina()Dim ie As InternetExplorer
Set ie = New InternetExplorer

ie.Navigate "http://epmo.intranet.com//Webforms/TaskCreation.aspx"

Do 'Wait till the edit page is loaded.
Loop Until ie.ReadyState = READYSTATE_COMPLETE And Not ie.Busy


ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN1").Value = "COMPANY"
ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN2").Value = "COMPUTER"
ie.Document.getElementById("Content_TEXT_ALPHA_COLUMN14").Value = "5555"
ie.Document.Forms(0).Item("Content_ddlRegion").Value = "28"
ie.Document.Forms(0).Item("Content_ddlSubRegion").Value = "33"
ie.Document.Forms(0).Item("Content_ddlPriority").Value = "23"
ie.Document.Forms(0).Item("Content_ddlActivity").Value = "13720"
ie.Document.Forms(0).Item("Content_ddlClientCode").Value = "37"
ie.Document.Forms(0).Item("Content_ddlCompanyCode").Value = "62"
ie.Document.Forms(0).Item("Content_DDL_COLUMN1").Value = "5978"
ie.Document.Forms(0).Item("Content_DDL_COLUMN2").Value = "5966"

ie.Visible = True

End Sub



And here is part of the code from the Website..


Code:



    Activity :
                    </td>
                    <td style="width: 160px;" align="left">
                        <select name="MasterPage$Content$ddlActivity" onchange="javascript:setTimeout('WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;MasterPage$Content$ddlActivity&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true))', 0)" id="Content_ddlActivity" tabindex="14" title="Classification of submitted request." class="DROPDOWNLIST_CLASS" style="width:150px;">
  <option selected="selected" value="0" Title="--Select--">--Select--</option>
  <option value="13718" Title="COR">COR</option>
  <option value="4339" Title="1">Order 1</option>
  <option value="13720" Title="2">Order 2 </option>
  <option value="13719" Title="2">Order 3</option>
 
 </select>
                        <span id="Content_rfvddlActivity" style="color:Red;display:none;">*</span>
                    </td>
                    <td style="width: 160px;" align="right">


Viewing all articles
Browse latest Browse all 42243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>