A
Armel
Guest
Bonjour le Forum,
Voila, le programme ci-dessous recherche le mot que je tape dans la cellule C13, dans une feuille d'excel. Puis il fait clignoter la cellule trouvée.
Sub Recherche()
ActiveSheet.Cells.Find(What:=Worksheets(2).[c13], After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Select
mémo1 = ActiveCell.Interior.ColorIndex
mémo2 = ActiveCell.Font.Size
mémo3 = ActiveCell.Font.Color
mémo4 = ActiveCell.Font.Bold
For i = 1 To 1
Application.Wait Now + TimeValue("00:00:01")
ActiveCell.Interior.Color = RGB(27, 27, 255)
ActiveCell.Font.Color = RGB(255, 255, 255)
ActiveCell.Font.Bold = True
Application.Wait Now + TimeValue("00:00:01")
ActiveCell.Interior.Color = RGB(27, 27, 255)
ActiveCell.Font.Color = RGB(255, 255, 255)
ActiveCell.Font.Bold = True
Next i
ActiveCell.Interior.ColorIndex = mémo1
ActiveCell.Font.Size = mémo2
ActiveCell.Font.Color = mémo3
ActiveCell.Font.Bold = mémo4
End Sub
Le probleme est: si je tape un mot qui n'existe pas dans la feuille il m'ouvre la fenetre de débogage de VB.
Est que quelqu'un à une solution???
Merci à tous.
Voila, le programme ci-dessous recherche le mot que je tape dans la cellule C13, dans une feuille d'excel. Puis il fait clignoter la cellule trouvée.
Sub Recherche()
ActiveSheet.Cells.Find(What:=Worksheets(2).[c13], After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Select
mémo1 = ActiveCell.Interior.ColorIndex
mémo2 = ActiveCell.Font.Size
mémo3 = ActiveCell.Font.Color
mémo4 = ActiveCell.Font.Bold
For i = 1 To 1
Application.Wait Now + TimeValue("00:00:01")
ActiveCell.Interior.Color = RGB(27, 27, 255)
ActiveCell.Font.Color = RGB(255, 255, 255)
ActiveCell.Font.Bold = True
Application.Wait Now + TimeValue("00:00:01")
ActiveCell.Interior.Color = RGB(27, 27, 255)
ActiveCell.Font.Color = RGB(255, 255, 255)
ActiveCell.Font.Bold = True
Next i
ActiveCell.Interior.ColorIndex = mémo1
ActiveCell.Font.Size = mémo2
ActiveCell.Font.Color = mémo3
ActiveCell.Font.Bold = mémo4
End Sub
Le probleme est: si je tape un mot qui n'existe pas dans la feuille il m'ouvre la fenetre de débogage de VB.
Est que quelqu'un à une solution???
Merci à tous.