Mister Binaire
XLDnaute Occasionnel
Bonsoir le Forum,
Je voudrais que les datas soient envoyés uniquement sur la feuille "Formulaire Process" et supprimer ainsi le Select Case cells (I,3) .
Qui peut me modifier la macro pour que cela marche !!
Merci d'avance
MB
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Dim i As Integer
Dim Feuille As String
Dim PL As Range
If Target.Value <> "" Then Cancel = True: Exit Sub
If Target.Column = 4 And Target.Row > 11 And Cells(Target.Row, 1) <> "" Then
Cancel = True
i = Target.Row
Select Case Cells(i, 3)
Case "Process": Feuille = "Formulaire Process"
Case "Demande de Travaux": Feuille = "Formulaire DT"
End Select
With Sheets(Feuille)
.[W1] = .[W1] + 1
Set PL = .Range("A6:A43")
PL(.[W1]) = Cells(i, 1)
PL(.[W1]).Offset(, 1) = Cells(i, 2)
End With
Cells(i, 4) = "ü"
End If
End Sub
Je voudrais que les datas soient envoyés uniquement sur la feuille "Formulaire Process" et supprimer ainsi le Select Case cells (I,3) .
Qui peut me modifier la macro pour que cela marche !!
Merci d'avance
MB
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Dim i As Integer
Dim Feuille As String
Dim PL As Range
If Target.Value <> "" Then Cancel = True: Exit Sub
If Target.Column = 4 And Target.Row > 11 And Cells(Target.Row, 1) <> "" Then
Cancel = True
i = Target.Row
Select Case Cells(i, 3)
Case "Process": Feuille = "Formulaire Process"
Case "Demande de Travaux": Feuille = "Formulaire DT"
End Select
With Sheets(Feuille)
.[W1] = .[W1] + 1
Set PL = .Range("A6:A43")
PL(.[W1]) = Cells(i, 1)
PL(.[W1]).Offset(, 1) = Cells(i, 2)
End With
Cells(i, 4) = "ü"
End If
End Sub