Historique

Résolu/Fermé
juer31 Messages postés 107 Date d'inscription mercredi 16 décembre 2015 Statut Membre Dernière intervention 25 mars 2024 - 1 avril 2019 à 14:41
michel_m Messages postés 16603 Date d'inscription lundi 12 septembre 2005 Statut Contributeur Dernière intervention 16 décembre 2023 - 1 avril 2019 à 16:19
Bonjour,



J'ai ce code qui met en historique tout mes cellule que change mais j'aimerais mettre seulement la colone L
quelqu'un peut m'aider?

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim col As Range
Set col = Columns("L")
If Not Intersect(Target, col) Is Nothing Then
Target.Offset(1, 0).Select
celaddress = Target.Address
colonne = Target.Column
UserForm1.Show
Target.Offset(1, 0).Select
End If
End Sub
Sub test_UserName()
Dim Nom As String
Nom = Environ("USERNAME")
MsgBox Nom
End Sub


Private Sub WorkSheet_Change(ByVal Target As Range)

If Target.Count <> 1 Then Exit Sub
If Target = "" Then Exit Sub
r = Target.Address & ")" & Date & " - " & Target.Value & " - " & Environ("username")
c = Target.Column
With Worksheets("historiques")
dl = .Cells(Rows.Count, c).End(xlUp).Row
If .Cells(dl, c) <> r Then .Cells(dl + 1, c) = r
End With
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells(1, 9).Value = ActiveCell.Value


End Sub

1 réponse

michel_m Messages postés 16603 Date d'inscription lundi 12 septembre 2005 Statut Contributeur Dernière intervention 16 décembre 2023 3 303
1 avril 2019 à 16:19
Bonjour

Un exemple avec 2 classeurs: Dissident.xls où des changements sont opérés sur une colonne (L) et sont caftés ( qui, quoi,avant- après, quand date-heure)
dans le classeur Bigbrother.xls
https://mon-partage.fr/f/xTSWzClK/
attention extraire le zip et non l'ouvrir
si je la retrouve (..) et si ça t'intéresse, on peut cafter sur un fichier texte
0