Bonjours à tous, j'ai fouillé partout sur le net et sur le forum mais rien a faire, je comprend pas pourquoi ma macro avec .find ne marche pas sous excel97...
Voila ma macro:
Private Sub UserForm_Initialize()
Dim cel As Range
TextBox1.Value = ActiveCell.Value
With Sheets("Repertoire N").Range("B4:B370")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues) [cette commande est soulignée en jaune avec message d'erreur :"impossible de lire la propriete .find de la classe range"
If Not cel Is Nothing Then TextBox96 = VBA.Strings.Format(cel.Offset(0, 3), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox97 = VBA.Strings.Format(cel.Offset(0, 5), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox98 = VBA.Strings.Format(cel.Offset(0, 7), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox99 = VBA.Strings.Format(cel.Offset(0, 9), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox100 = VBA.Strings.Format(cel.Offset(0, 11), "# ##0.00 €")
End With
end sub
Quelqu'un a une idée ???
Voila ma macro:
Private Sub UserForm_Initialize()
Dim cel As Range
TextBox1.Value = ActiveCell.Value
With Sheets("Repertoire N").Range("B4:B370")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues) [cette commande est soulignée en jaune avec message d'erreur :"impossible de lire la propriete .find de la classe range"
If Not cel Is Nothing Then TextBox96 = VBA.Strings.Format(cel.Offset(0, 3), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox97 = VBA.Strings.Format(cel.Offset(0, 5), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox98 = VBA.Strings.Format(cel.Offset(0, 7), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox99 = VBA.Strings.Format(cel.Offset(0, 9), "# ##0.00 €")
Set cel = .Find(CDate(TextBox1), LookIn:=xlValues)
If Not cel Is Nothing Then TextBox100 = VBA.Strings.Format(cel.Offset(0, 11), "# ##0.00 €")
End With
end sub
Quelqu'un a une idée ???