Bonjour,
Dans la cellule, ne copiez que les valeurs 192, 210, 0.
Le code devient alors:
Sub Macro2()
Dim CMColour As String, v1 As String, v2 As String
Dim R As Integer, G As Integer, B As Integer
CMColour = Worksheets("Results").Range("U16")
v1 = InStr(1, CMColour, ",", 0)
v2 = InStrRev(CMColour, ",", -1)
R = CInt(Left(CMColour, v1 - 1))
G = CInt(Mid(CMColour, v1 + 1, v2 - 1 - v1))
B = CInt(Mid(CMColour, v2 + 1, 3))
Worksheets("R2 S3").Activate
ActiveSheet.ChartObjects("Graphique 1").Activate
ActiveChart.SeriesCollection(1).Select
With Selection.Format.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(R, G, B)
.Transparency = 0
.Solid
End With
With Selection.Format.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(R, G, B)
.Transparency = 0
End With
End Sub
Cdlt