[COLOR="DarkSlateGray"][B]Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim i&, j&, tf As Boolean
Application.ScreenUpdating = False
If Target.Column = 1 Then
Cancel = True
Cells.EntireRow.Hidden = False
Cells.EntireColumn.Hidden = False
End If
If Target.Row > 4 And Target.Column = 1 And Not IsEmpty(Target) Then
On Error GoTo E
Application.Worksheets.Add After:=Me
ActiveSheet.Name = Target.Value & "_pair"
R: On Error GoTo 0
With Me.Range(Me.Range("B5"), Target.SpecialCells(xlLastCell))
For j = 1 To .Columns.Count
If IsEmpty(Me.Cells(Target.Row, .Columns(j).Column)) Or Me.Cells(Target.Row, .Columns(j).Column).Value = "" Or Me.Cells(Target.Row, .Columns(j).Column).Value = 0 Then Me.Columns(.Columns(j).Column).EntireColumn.Hidden = True
Next j
For i = 1 To .Rows.Count
tf = True
For j = 1 To .Columns.Count
If Me.Columns(.Columns(j).Column).EntireColumn.Hidden = False Then tf = tf And (IsEmpty(.Cells(i, j)) Or .Cells(i, j) = "" Or .Cells(i, j) = 0)
Next j
If tf Then .Rows(i).EntireRow.Hidden = True
Next i
End With
With Sheets(Target.Value & "_pair")
.Cells.ClearContents
Me.Range(Me.Range("A1"), Target.SpecialCells(xlLastCell)).SpecialCells(xlCellTypeVisible).Copy Destination:=.Range("A1")
.Range("A1").Value = .Name
.Activate [COLOR="SeaGreen"]'Facultatif[/COLOR]
End With
Me.Cells.EntireRow.Hidden = False [COLOR="SeaGreen"]'Facultatif[/COLOR]
Me.Cells.EntireColumn.Hidden = False [COLOR="SeaGreen"]'Facultatif[/COLOR]
End If
Application.ScreenUpdating = True
Exit Sub
E: Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
Resume R
End Sub[/B][/COLOR]