Colouring lines and vertices of polyline shapes

jrickards

New Member
Joined
Sep 15, 2014
Messages
12
Is there a VBA method to change the outline and vertices colors in a polyline?
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,848
As far as I know Excel does not support a "true" polyline directly, although you can build one by grouping individual line segments.

This code will allow you to work with those individual segments:

Code:
Sub WorkWithGroupedShapes()

    Dim go
    Dim shp As Shape
    Dim aryShapes As Variant
    
    If TypeName(Selection) = "GroupObject" Then
        Set go = Selection  'GroupObject (Stop & explore with Locals window)
        For Each shp In ActiveSheet.Shapes(Selection.Name).GroupItems
            Debug.Print shp.Name, shp.Type  'see MsoShapeType Enumeration in VBA Help
        Next
    End If
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,108,788
Messages
5,524,879
Members
409,609
Latest member
Channingz

This Week's Hot Topics

Top