1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| Private Sub TextBox1_KeyDown(ByVal KeyCode As MDForms.ReturnInteger, ByVal Shift As Integer)
Dim rechercheTrouvee As Boolean
rechercheTrouvee = False
If KeyCode = 13 Then
Application.ScreenUpdating = False
If TextBox1 = «*» Then
Range («*A3:A154*»).Interior.Color = 13434777
rechercheTrouvee = True
Else
Range(«*A3:A154*»).Interior.ColorIndex = 0
For ligne = 3 To 154
If Cells(ligne, 1) Like «***» & TextBox1 & «***» Then
Cells(ligne, 1).Interior.Color = 13434777
If rechercheTrouvee = False Then
ActiveSheet.Cells( ligne, 2).Select
ActiveWindow.ScrollRow = Sélection.Row
Worksheets(«*MÉMENTO*»).TextBox1.Verb
RechercheTrouvee = True
End if
End if
End if
End Sub |
Partager