Quote Originally Posted by .paul. View Post
can you post the exact code you're using?
Sure. Here you go. (Note: In my last post i said combobox1. It's actually combobox2)

Code:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dialog1.ShowDialog()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'open website in wb
        WebBrowser1.Navigate("http://www.itslearning.com/welcome.aspx")
        'fill combobox
        If WebBrowser1.ReadyState <> WebBrowserReadyState.Complete Then Return
        Dim element As HtmlElement = WebBrowser1.Document.GetElementById("ctl00_ContentPlaceHolder1_LoginSection1_ChooseSite_site_input")
        Dim options() As String = element.GetElementsByTagName("option").Cast(Of HtmlElement).Select(Function(el) el.InnerText).ToArray
        ComboBox2.Items.AddRange(options)
    End Sub

    Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
        'select combobox item in webpage
        If ComboBox2.SelectedIndex <> -1 Then
            Dim element As HtmlElement = WebBrowser1.Document.GetElementById("ctl00_ContentPlaceHolder1_LoginSection1_ChooseSite_site_input")
            Dim optionsElement As HtmlElement = element.GetElementsByTagName("option").Cast(Of HtmlElement).First(Function(el) el.InnerText = ComboBox2.Text)
            optionsElement.SetAttribute("selected", "selected")
        End If
    End Sub
End Class