Bonjour,
ton code d'origine
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("D2:D9")) Is Nothing Then
Range("B2").Select
ActiveCell.FormulaR1C1 = "M "
Range("C2").Select
ActiveCell.FormulaR1C1 = "BLANC "
End If
End Sub
le code modifié avec Ligne = ActiveCell.Row
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("D2:D9")) Is Nothing Then
Ligne = ActiveCell.Row
Range("B" & Ligne).Select
ActiveCell.FormulaR1C1 = "M "
Range("C" & Ligne).Select
ActiveCell.FormulaR1C1 = "BLANC "
End If
End Sub
le code corrigé pour qu'il fonctionne
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("D2:D9")) Is Nothing Then
Ligne = ActiveCell.Row
Range("B" & Ligne) = Range("B" & Ligne) & " "
Range("C" & Ligne) = Range("G" & Ligne) & " "
End If
End Sub
Fichier_JP-v2
@+JP