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 28 29 30 31 32 33
| Option Compare Text
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call Enreg
End Sub
Private Sub ListBox1_Click()
ActiveWindow.ScrollRow = Me.ListBox1.List(Me.ListBox1.ListIndex, 1)
End Sub
Private Sub TextBox1_Change()
Application.ScreenUpdating = False
Range("A9:A1000").Interior.ColorIndex = 2
ActiveWindow.ScrollRow = 9
With Me.ListBox1
.Clear
.ColumnCount = 2
.ColumnWidths = "-1;0"
.Height = 79.5
.Width = 97
End With
If TextBox1 <> "" Then
For ligne = 9 To 1000
If Cells(ligne, 1) Like TextBox1 & "*" Then
Cells(ligne, 1).Interior.ColorIndex = 43
ListBox1.AddItem Cells(ligne, 1)
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) = ligne
End If
Next
End If
End Sub |
Partager