How can I write this: every time I select a new row in the listview, orfvalgtprodukt is updated to the text in the first column in the selected row in the listview
How can I write this: every time I select a new row in the listview, orfvalgtprodukt is updated to the text in the first column in the selected row in the listview
listview.selectedindexchanged
simon.bruynsteen
You probably need to check if there actually is something in the SelectedItems collection before trying to use it.
If lstProdukt.SelectedItems.Count > 0 Then
orfValgtProdukt = lstProdukt.SelectedItems.Item(0)
...