Aide listbox
Résolu
kadiski
Messages postés
50
Date d'inscription
Statut
Membre
Dernière intervention
-
kadiski Messages postés 50 Date d'inscription Statut Membre Dernière intervention -
kadiski Messages postés 50 Date d'inscription Statut Membre Dernière intervention -
1 réponse
Bonjour,
Si j'ai bien compris votre demande:
Si j'ai bien compris votre demande:
Private Sub CommandButton1_Click() If ListBox1.ListCount > 0 Then With Worksheets("mise en page") derlig = .Range("D" & Rows.Count).End(xlUp).Row If derlig < 5 Then derlig = 5 .Range("A13:C20" & derlig).ClearContents .Range("A13").Resize(ListBox1.ListCount) = ListBox1.List .Activate End With Else MsgBox " Pas d'info dans la listbox!!!!!!!" End If End Sub Private Sub TextBox1_Change() Application.ScreenUpdating = False Range("A5:F40").Interior.ColorIndex = 2 ListBox1.Clear ListBox1.IntegralHeight = False ListBox1.ColumnCount = 1 If TextBox1 <> "" Then For ligne = 5 To 50 If Cells(ligne, 2) Like TextBox1 & "*" Then Cells(ligne, 1).Resize(, 4).Interior.ColorIndex = 8 ListBox1.AddItem Cells(ligne, 2) & " - " & Cells(ligne, 3) & " - " & Cells(ligne, 4) ' la list box prends en compte les lignes 5 à 50 du tableau et les colonnes ABC et D' End If Next End If If ListBox1.ListCount < 1 Then Msgnbox " Pas d'info trouvee !!!!!!!" End Sub
en te remerciant et bonne continuation