Hi all,

I have a bunch of shapes on a spreadsheet including lines, squares, triangles etc. I change the colour of the shape depending on some criteria and if the shape is a line I only want to change the line colour however if it is other than a line, i.e. a triangle, I want the line colour to remain the same but the fill colour to change.

            R = Application.WorksheetFunction.VLookup(Draw_Start_Cell.Offset(counter, i + 1).Value, rng, 3, False)
            G = Application.WorksheetFunction.VLookup(Draw_Start_Cell.Offset(counter, i + 1).Value, rng, 4, False)
            B = Application.WorksheetFunction.VLookup(Draw_Start_Cell.Offset(counter, i + 1).Value, rng, 5, False)
            
            On Error Resume Next
            Set shp = ActiveSheet.Shapes(Draw_Start_Cell.Offset(counter, i).Value)
            On Error GoTo Skip

            With shp
                If .Type = msoConnectorStraight Then .Line.ForeColor.RGB = RGB(R, G, B)
            End With
this is the unfinished code at the moment, the code is contained within a loop. The if .Type line changes the the boarder on squares, triangles etc which I don't want to happen, just the fill. It works as I want it to on a straight line. Any suggestions?

Cheers,
Marcus