Lone-wolf
XLDnaute Barbatruc
Bonjour à tous et très bon dimanche,
j'ai un problème avec la macro suivante. En activant la cellule de la colonne F, la macro me recopie la ligne des titre, hors j'aimerais éviter celà si c'est possible.
A+ 😎
j'ai un problème avec la macro suivante. En activant la cellule de la colonne F, la macro me recopie la ligne des titre, hors j'aimerais éviter celà si c'est possible.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Sheets(1).Activate
If Not Intersect(Target, Range("a2:f65000")) Is Nothing Then
On Error Resume Next
With ActiveCell.EntireRow
If ActiveCell = Range("f:f") Then: ActiveCell.ClearContents: Range("g1:p65000").ClearContents
If ActiveCell = "" Then 'On commence la saisie en colonne A
Range("a1:f1").Copy ActiveCell
.Font.Bold = False
.Font.Color = RGB(216, 216, 216)
.HorizontalAlignment = xlLeft
Else
Target.Font.Color = RGB(0, 0, 0)
Range("d2:d65000").HorizontalAlignment = xlRight
End If
End With
End If
Application.EnableEvents = True
End Sub
A+ 😎
Pièces jointes
Dernière édition: