Private Sub B_ok_Click()
Application.ScreenUpdating = False
Set f = ActiveSheet
Me.ListBox1.Clear
Set plage = f.[A5].CurrentRegion
plage.Interior.ColorIndex = 2
Set plage = plage.Offset(1).Resize(plage.Rows.Count - 1)
Set c = plage.Find(Me.TextBox1, , , xlPart)
If Not c Is Nothing Then
i = 0
premier = c.Address
Do
Me.ListBox1.AddItem
Me.ListBox1.List(i, 0) = c.Value
Me.ListBox1.List(i, 1) = c.Row
c.Interior.ColorIndex = 3
i = i + 1
Set c = plage.FindNext(c)
Loop While Not c Is Nothing And c.Address <> premier
End If
End Sub
Private Sub B_tout_Click()
Application.ScreenUpdating = False
Set f = ActiveSheet
Set plage = f.[A5].CurrentRegion
plage.Rows.Hidden = False
End Sub
Private Sub ListBox1_Click()
ligne = Val(ListBox1.Column(1))
Rows(ligne).Select
End Sub
Private Sub B_filtre_Click()
Application.ScreenUpdating = False
Set f = ActiveSheet
Set plage = f.[A5].CurrentRegion
plage.Offset(1).Rows.Hidden = True
n = Me.ListBox1.ListCount
For i = 0 To n - 1
ligne = Me.ListBox1.List(i, 1)
ActiveSheet.Rows(ligne).Hidden = False
Next i
End Sub
Private Sub B_copie_Click()
Set f = ActiveSheet
Set plage = f.[A5].CurrentRegion
plage.SpecialCells(xlCellTypeVisible).Copy Sheets("Result").[A1]
End Sub