first post* new to VBA and coding, trying to learn as much as I can
Trying to automate internet explorer to do the following in this order:
- Loop through 7+ check boxes
- if checkbox is true then link an adjacent cell's value
- use that value to fill web form fields
- select value from drop down(s) on web form
- submit web form
- close browser
I'm struggling to find documentation on how to link values when a checkbox = true
Code
For i = 1 To 7+
If Sheet1.OLEObjects("CheckBox" & i).Object.Value = True Then
'...take string value
'...insert into form field IE.Document.getElementsByName("MyString")(0).Value = ThisWorkbook.Sheets("sheet1").Range("a2")
'...select drop downs
'...submit form
'...close IE
Else
'...skip if checkbox isn't checked
End If
I have been unsuccessful at selecting drop down values.
Code
IE.Document.getElementById("regionDrdn").Value = 2
IE.Document.getElementById("stageDrdn").Value = certification
If anyone has guidance, I would really appreciate it. Thanks