1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ListBox2.SelectedItem Is Nothing Then
MsgBox("selectionner defaut")
Exit Sub
End If
If ListBox1.SelectedItem Is Nothing Then
MsgBox("selectionner palettier")
Exit Sub
End If
If ListBox3.SelectedItem Is Nothing Then
MsgBox("selectionner emplacement")
Exit Sub
End If
' voici mon code
Dim j As Integer
Dim defaut As String
For Each j In ListBox2.SelectedIndices
defaut = ListBox2.Items.Item(j)
' code
PalettierBindingSource.AddNew()
' MsgBox(defaut)
Next
ListBox1.SelectedItems.Clear()
ListBox2.SelectedItems.Clear()
ListBox3.SelectedItems.Clear()
ListBox3.Visible = False
End Sub |
Partager