Bonjour,
J'ai un problème avec la méthode Find.
Lorsque je l'utilise pour rechercher une chaîne de caractères ou une valeur dans un tableau situé dans une feuille excel et de m'afficher les resultats dans une listbox , elle fonctionne très bien.
Toutefois, il semble qu'elle beug desque j'entre une date de cet format dd/mm/ yy (15/07/2016)
Dim c As Range
Dim tablo() As String
Dim Text As String
Dim S As Byte
Dim Firstaddress As String
Dim i As Integer, x As Integer, L As Integer
Text = Me.TextBox8
If Text = "" Then Exit Sub
Sheets("sheet1").Activate
With Sheets("sheet1").UsedRange
Set c = .Find(Text, LookIn:=xlValues, LookAt:=xlPart)
If Not c Is Nothing Then
Firstaddress = c.Address
Do
ReDim Preserve tablo(13, i)
For x = 1 To 13
tablo(x - 1, i) = c.Offset(0, x - c.Column).Text
Next x
i = i + 1
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> Firstaddress
End If
End With
MsgBox "Nombre des condidats trouvés " & i, vbInformation
If i = 0 Then
MsgBox "Le Texte " & Text & " n'a pas été trouvé" & vbCrLf & ", vbCritical, Sign
Exit Sub
End If
Me.ListBox1.Column() = tablo()