Re : listbox mele les dates
Salut Bebere
Je viens de prendre connaissance de ton code , pour le moment j'ai une erreur avec la boucle With il ne reconnait pas la fin de la boucle
je t'envoie quand meme ton code que je crois avoir placer au bon endroit dans mon code , alors je continue ma recherche a savoir ou je plante je te revient merci a toi Bebere
Private Sub Rechercher(Quoi$, Ou&)
Dim c As Range, X&, i As Byte
Dim compteur As Integer
If Quoi = "" Then Quoi = "*"
ListBoxRech.Clear
With Sheets("Entree")
compteur = 0
For Each c In .Range(.Cells(3, Ou), .Cells(65000, Ou).End(xlUp))
If c Like Quoi Then
ListBoxRech.AddItem
X = ListBoxRech.ListCount - 1
For i = 1 To 9
Select Case i
Case 2
ListBoxRech.List(X, i) = .Cells(c.Row, i).Text 'Format(.Cells(c.Row, i), "dd mmmm yyyy")
'si tu as tjrs un problème
'DateSerial(Year(.Cells(c.Row, i).Value), Month(.Cells(c.Row, i).Value), Day(.Cells(c.Row, i).Value))
Case 4
ListBoxRech.List(X, i) = .Cells(c.Row, i).Text 'Format(.Cells(c.Row, i), "hh:mm")
Case Else
ListBoxRech.List(X, i) = .Cells(c.Row, i)
End Select
Next
' ListBoxRech.List(X, 2) = Format(CDate(ListBoxRech.List(X, 2)), "dd mmmm yyyy")
' ListBoxRech.List(X, 4) = Format(CDate(ListBoxRech.List(X, 4)), "hh:mm")
End With
End Sub
bonne journee a toi et a tous les acros de ce site
dennnisss