1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("D2:D1000")) Is Nothing Then Exit Sub
Cancel = True
If Target = "" Then Exit Sub
nom = inputbox " saisir nom"
if nom <> "" then
sheets.add
activesheet.name = nom
end if
Sheets(nom).Cells.Clear
With Sheets("BDD avec doublon").Range("A:G")
.AutoFilter field:=4, Criteria1:=Target.Value
.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets(nom).Range("A1")
.AutoFilter
End With
Sheets("Feuil3").Select
End Sub |
Partager