Bonjour je cherche à combiner entre ces deux code dans la même feuille.
[Option Explicit
Dim lignes As Variant, plage As Range
Dim i&, j&
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Set plage = Range("F7")
lignes = Array(7, 20, 22, 23, 25, 27, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 51, 53, _
55, 57, 60, 62, 64, 66, 68)
For i = 0 To UBound(lignes)
For j = 8 To 33
Set plage = Union(plage, Cells(lignes(i), j))
Next j
Next i
If Not Intersect(Target, plage) Is Nothing Then
UserForm1.Show
End If
Cancel = True
End Sub]
[Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$B$6" Then Exit Sub
Application.Run ("Consolidation")
End Sub
j'ai toujours des problèmes d’exécution.
Merci par avance.