Private Sub Worksheet_Deactivate()
Range("D7:O" & Rows.Count).ClearComments 'RAZ
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("D7:O" & Rows.Count).ClearComments 'RAZ
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim c As Range, f As Variant
Set c = Intersect(Target(1).EntireRow, [B:B])
If Not c Like "Autres*" Then Exit Sub
Cancel = True
With Sheets("BDD").[A1].CurrentRegion 'nom de la feuille à adapter
For Each c In Intersect(c.EntireRow, [D:O])
f = c.Formula
f = Replace(f, "A" & c.Row - 5, "A$" & c.Row - 5)
f = Replace(Replace(Replace(Replace(f, "$A:$A", "A2"), "$B:$B", "B2"), "$C:$C", "C2"), "$D:$D", "D2")
If Left(f, 1) <> "=" Then f = False 'pas indispensable
.Cells(2, .Columns.Count + 2) = f 'critère de filtrage en F2
.AdvancedFilter xlFilterInPlace, .Cells(1, .Columns.Count + 2).Resize(2)
InsereImage .Cells, c
Next
If .Parent.FilterMode Then .Parent.ShowAllData 'RAZ
.Cells(1).Copy .Cells(1) 'vide le presse-papiers
End With
End Sub