Re : Recherche et copie de données entre 2 fichiers
Bonjour
en haut vous mettez un
Dim MaLigne As Integer
Dans le bas de la macro tu as ces ligne la
End If
Cancel = True
Call FormatageLigne(pdt, MaLigne) c'est celle ci qu'il faut ajouter
End Sub
puis vous créez un module et vous collez cela dedans
Sub FormatageLigne(ByVal DTP As String, ByVal MaLigne As Integer)
Windows("Nomenclature.xls").Activate
Sheets(Array("M01", "R01", "R02", "R03", "R04", "R05", "R06", "R07", "R08", "M02")).Select
Sheets("M01").Activate
Range("A" & MaLigne + 1, "ac" & MaLigne + 1).Select
With Selection.Font
.Name = "Arial"
.Size = 10
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Range("C" & MaLigne + 1).Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
Range("A5").Select
Sheets("M01").Activate
End Sub
a+