Hi there,

I'm having a bit of a problem submitting validation information into a website through an excel field. The first input on the website is a text box which works fine but the second one is a choice of country on a dropdown list. I only have US and Canada as options on my excel sheet and when I run the code using either one of the value selected on Excel field, website opens and enters the first field (text box), but it submits without choosing the right country. Really appreciate your help in fixing this. Following is the vba code:

Private Sub CommandButton2_Click()

Set objIE = CreateObject("InternetExplorer.Application")

dlookup1 = ActiveSheet.Range("$B$6").Value
dlookup2 = ActiveSheet.Range("$B$7").Value

With objIE
.Visible = True
.navigate "http://mycredit.dnb.com/advanced-company-search/"

Do While .Busy Or _
.readyState <> 4
DoEvents
Loop
'This is for the first field (textbox)
Set what = .document.getElementsByName("dunsNumber")
what.Item(0).Value = dlookup1

'This is for the dropdown form
Set what = .document.getElementsByName("dunsCountry")
what.Item(0).Value = dlookup2

objIE.document.forms(0).submit


Do While .Busy Or _
.readyState <> 4
DoEvents
Loop
For Each ele In .document.all

Next ele
End With
Set objIE = Nothing

End Sub