I need to delete an item from a ListBox
, but I have two forms, in the first one is ListBox
and in the second one too, but I need that when I press the delete button the first items that came in as I can be deleted do?
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
Form2.ListBox1.Items.RemoveAt(Form2.ListBox1.SelectedIndex)
End Sub