I think you're wanting an openfiledialog.
also, the issue above is that everytime you click, you're reading and processing the textfile. You will need to clear the items of the comboboc prior to the for each statement
Dim ofd As New OpenFileDialog ofd.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*" If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then Dim sr As StreamReader = New StreamReader(ofd.filename) combobox1.items.clear For Each item As String In sr.ReadToEnd().Split(Environment.NewLine) ComboBox1.Items.Add(item) Next end if
Then you will want to double-click on your combobox and in the default event that comes up, set your label = combobox1.text