Bonjour et merci de me corriger, et aussi de me porter votre aide, sur ce code ci dessus, j'aimerai annuler un débogage, mais je ne sais pas comment l'introduire sur le code.
le débogage se lance si la combobox, prends un nom d'une feuil qui n'existe pas sur le fichier Excel, c'est normal comme débogage, mais je ne sais pas comment le faire corriger, surtout en utilisant l'événement change. Merci de votre aide, voila le code
le débogage se lance si la combobox, prends un nom d'une feuil qui n'existe pas sur le fichier Excel, c'est normal comme débogage, mais je ne sais pas comment le faire corriger, surtout en utilisant l'événement change. Merci de votre aide, voila le code
Code:
Private Sub ComboBox1_Change()
ListView3.ListItems.Clear
TextBox1.Text = ""
TextBox4.Text = ""
NomFeuil = ComboBox1.Value
With Sheets(NomFeuil)
For i = 4 To .Range("A65000").End(xlUp).Row
If ComboBox1.Value = NomFeuil And .Cells(i, 6) = "" And .Cells(i, 1) <> "-" And .Cells(i, 1) <> "" Then
Set Li = ListView3.ListItems.Add(, "A" & i, .Cells(i, 1))
Li.ListSubItems.Add , , .Cells(i, 2)
Li.ListSubItems.Add , , .Cells(i, 3)
Li.ListSubItems.Add , , .Cells(i, 4)
Li.ListSubItems.Add , , .Cells(i, 5)
Li.ListSubItems.Add , , .Cells(i, 7)
Li.ListSubItems.Add , , .Cells(i, 8)
Li.ListSubItems.Add , , .Cells(i, 13)
Li.ListSubItems.Add , , i
End If
Next
End With
Dim J As Integer
With Sheets(NomFeuil)
For J = 4 To .Range("A65000").End(xlUp).Row
With Sheets(NomFeuil)
If .Cells(J, 1) = "-" Then
TextBox1.Value = .Cells(J, 13)
End If
End With
Next
End With
End Sub