Sub test1()
Dim Rng As Range, LigneLu&: LigneLu = 1
LeMot = CStr(InputBox("Mot recherché?", "Test", "Forum XLD"))
[A1].Clear: [A1] = LeMot
Set Rng = Range("A" & LigneLu)
'avec la macro paramétrée
VerifierEtColorier Rng, "Forum XLD"
End Sub
Sub test2()
Dim Rng As Range, LigneLu&: LigneLu = 1
LeMot = CStr(InputBox("Mot recherché?", "Test", "Forum XLD"))
[A1].Clear: [A1] = Date
Set Rng = Range("A" & LigneLu)
'avec la macro paramétrée
VerifierEtColorier Rng, "Forum XLD"
End Sub
Private Sub VerifierEtColorier(r As Range, MotCS$)
r.Interior.Color = IIf(LTrim(RTrim(r.Text)) = MotCS, RGB(225, 94, 41), xlNone)
End Sub