We help IT Professionals succeed at work.
Get Started

Combo box "Product_ID" triggers the onchange event and values in Combo box "Service_Access_Type" value changes. Unable to get this done via VBA. Please help. I need this urgently.

Ajay Sawant
Ajay Sawant asked
on
249 Views
Last Modified: 2018-02-02
I am fetching values from Excel workbook and filling the web page.

The HTML Code of that web page -

<select name="Product_id" id="Product_id" onchange="setAccess_Type3(request3)">
							<option ></option>
							
							<option value="AVPN-ETH">AVPN-ETH</option>
							
							<option value="EPLS">EPLS</option>
							
							<option value="MIS">MIS</option>
							
							<option value="OPT-E-WAN">OPT-E-WAN</option>
							
						</select>
					</td>
				</tr>

				<tr>
					<td>Service Access Type<font color="red">*</font>:</td>
					<td>
		<select name="Service_Access_Type" id="Service_Access_Type" onchange="setBandWidth3(request3)">
						</select>
					</td>


My VBA code so far - Sub BOT_Processing()


Dim IE As Variant
Dim form As Variant, button As Variant

Set IE = CreateObject("InternetExplorer.Application")

Site_Id = Range("B1").Value
Street_Address = Range("B7").Value
City = Range("B8").Value
State = Range("B9").Value
Zip_Code = Range("B10").Value
Att_Product_id = Range("B14").Value
Service_Access_Type = Range("B15").Value
Term = Range("B16").Value
Access_Bandwidth_id = Range("B17").Value
Customer_Interface = Range("B19").Value
Additional_Information = Range("B23").Value
RECEIVER_ATTUID = Range("B24").Value


With IE
.Visible = True
.navigate ("http://psta.web.att.com/ext/Sales_RFP/requests/insertSingleRequest.cfm?skip_IGLOO=Y&step1=TRUE")

    While IE.readyState <> 4
DoEvents
Wend


IE.document.getElementsByName("Site_Id").Item.innerText = Site_Id
IE.document.getElementsByName("Street_Address").Item.innerText = Street_Address
IE.document.getElementsByName("City").Item.innerText = City
IE.document.getElementsByName("State").Item(0).Value = State
IE.document.getElementsByName("Zip_Code").Item.innerText = Zip_Code
IE.document.getElementsByName("Att_Product_id").Item(0).Value = Att_Product_id


IE.document.getElementsByName("Service_Access_Type").Item(0).Value = Service_Access_Type
IE.document.getElementsByName("Term").Item(0).Value = Term
IE.document.getElementsByName("Access_Bandwidth_id").Item(0).Value = Access_Bandwidth_id
IE.document.getElementsByName("Customer_Interface").Item(0).Value = Customer_Interface
IE.document.getElementsByName("Additional_Information").Item.innerText = Additional_Information
IE.document.getElementsByName("RECEIVER_ATTUID").Item.innerText = RECEIVER_ATTUID



'Set form = ie.document.getElementsByTagName("form")
'Set button = form(0).onsubmit
'form(0).submit
End With

Set IE = Nothing





End Sub

Open in new window

Comment
Watch Question
This question hasn't been answered yet.
While you wait, find out how you can maximize your capability with the most trusted tool in IT.
Explore More Ask a Question
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE