1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Public T_Col, T_Val
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name <> "presentation" Then Exit Sub
If T_Col = 4 And T_Row = 5 Then ' les modifications proposées sont en colonne 4, ligne 5
' Recopie dans la feuille récap
code_client = Cells(3, 3)
Sheets("recap").Cells(code_client + 2, 4) = Cells(T_Row, T_Col)
' Remise à zéro de la valeur introduite
Cells(T_Row, T_Col) = ""
End If
' Mémorisation de la cellule sélectionnée
T_Col = Target.Column
T_Val = Target.Value
End Sub |
Partager