Sub Recherche_données()
Dim LaFeuille As String, Ladate As Range, Ligne As Long, MyDate As Date, dl As Integer, plage As Range
LaFeuille = Right(TextBox10, 4)
'If IsDate(TextBox10) Then
'MsgBox "c'est une date"
'Else
'MsgBox "ce n'est pas une date"
'Stop
'*********************************************
Debug.Print "TextBox10.Value=" & TextBox10.Value
If FeuilleExiste(LaFeuille) = True Then
Me.Label12.Caption = " la feuille " & LaFeuille & " existe"
With Sheets(LaFeuille)
dl = .Range("a" & Rows.Count).End(xlUp).Row
Set plage = .Range("b3:b" & dl)
plage = plage.Value
'Set Ladate = plage.Find(what:=Format(CDate(TextBox10), "dddd d mmmm yyyy"), LookIn:=xlValues)
'Set Ladate = plage.Find(what:=CDate(TextBox10), LookIn:=xlValues) 'LookIn:=xlFormulas
Set Ladate = plage.Find(what:=CDate(TextBox10), LookIn:=xlFormulas)
'Set Ladate = plage.Cells.Find(what:=CDate(TextBox10), Lookat:=xlWhole) 'lookat:=xlWhole
'Set Ladate = plage.Cells.Find(CDate(Me.TextBox10.Value), , xlValues, xlWhole)
If Ladate Is Nothing Then
Ligne = Ladate.Row 'plante ici
Debug.Print Ligne
Else
MsgBox "pas de correspondance"
End If
End With
Else
Me.Label12.Caption = " la feuille " & LaFeuille & " n'existe pas!"
Exit Sub
End If
'*********************************************
Set Ladate = Nothing
Set plage = Nothing
End Sub