Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim w As Worksheet, a(), n%, i As Variant, h&, titre As Range, P As Range
For Each w In Worksheets
If LCase(w.Name) Like "agent*" Then
ReDim Preserve a(n) 'base 0
a(n) = w.Name
n = n + 1
End If
Next w
i = Application.Match(Sh.Name, a, 0)
If IsError(i) Then Exit Sub
With Sheets("Source")
Set titre = .UsedRange.Rows(1).EntireRow
h = .Cells.Find("*", , xlValues, , xlByRows, xlPrevious).Row - titre.Row
h = Application.Ceiling(h, n) / n
If h Then Set P = .UsedRange.Rows(2 + h * (i - 1)).Resize(h).EntireRow
End With...