MsoShapeType enumeration


VBA array containing shapetype: value, name, and description



Code 1: assign msoShapeType enumeration values to a VBA array
Option Explicit
'' ========================

Type myShape
   Value As Integer
   Name As String
   Description As String
End Type

'' ========================
Dim shpArray(-2 To 24) As myShape

'' ========================
Sub shpArrayFill()

    shpArray(-2).Value = msoShapeTypeMixed
    shpArray(-2).Name = "msoShapeTypeMixed"
    shpArray(-2).Description = "Mixed shape type"
    
    shpArray(1).Value = msoAutoShape
    shpArray(1).Name = "msoAutoShape"
    shpArray(1).Description = "AutoShape"
    
    shpArray(2).Value = msoCallout
    shpArray(2).Name = "msoCallout"
    shpArray(2).Description = "Callout"
    
    
    shpArray(3).Value = msoChart
    shpArray(3).Name = "msoChart"
    shpArray(3).Description = "Chart"
    
    shpArray(4).Value = msoComment
    shpArray(4).Name = "msoComment"
    shpArray(4).Description = "Comment"
    
    shpArray(5).Value = msoFreeform
    shpArray(5).Name = "msoFreeform"
    shpArray(5).Description = "Freeform"
    
    shpArray(6).Value = msoGroup
    shpArray(6).Name = "msoGroup"
    shpArray(6).Description = "Group"
    
    shpArray(7).Value = msoEmbeddedOLEObject
    shpArray(7).Name = "msoEmbeddedOLEObject"
    shpArray(7).Description = "Embedded OLE object"
    
    shpArray(8).Value = msoFormControl
    shpArray(8).Name = "msoFormControl"
    shpArray(8).Description = "Form Control"
    
    shpArray(9).Value = msoLine
    shpArray(9).Name = "msoLine"
    shpArray(9).Description = "Line"
    
    shpArray(9).Value = msoLine
    shpArray(9).Name = "msoLine"
    shpArray(9).Description = "Line"
    
    shpArray(10).Value = msoLinkedOLEObject
    shpArray(10).Name = "msoLinkedOLEObject"
    shpArray(10).Description = "Linked OLE object"
    
    shpArray(11).Value = msoLinkedPicture
    shpArray(11).Name = "msoLinkedPicture"
    shpArray(11).Description = "Linked picture"
    
    shpArray(12).Value = msoOLEControlObject
    shpArray(12).Name = "msoOLEControlObject"
    shpArray(12).Description = "OLE control object"
    
    shpArray(13).Value = msoPicture
    shpArray(13).Name = "msoPicture"
    shpArray(13).Description = "Picture"
    
    shpArray(14).Value = msoPlaceholder
    shpArray(14).Name = "msoPlaceholder"
    shpArray(14).Description = "Placeholder"
    
    shpArray(15).Value = msoTextEffect
    shpArray(15).Name = "msoTextEffect"
    shpArray(15).Description = "Text effect"
    
    shpArray(16).Value = msoMedia
    shpArray(16).Name = "msoMedia"
    shpArray(16).Description = "Media"
    
    shpArray(17).Value = msoTextBox
    shpArray(17).Name = "msoTextBox"
    shpArray(17).Description = "Text box"
    
    shpArray(18).Value = msoScriptAnchor
    shpArray(18).Name = "msoScriptAnchor"
    shpArray(18).Description = "Script anchor"
    
    shpArray(19).Value = msoTable
    shpArray(19).Name = "msoTable"
    shpArray(19).Description = "Table"
    
    shpArray(20).Value = msoCanvas
    shpArray(20).Name = "msoCanvas"
    shpArray(20).Description = "Canvas"
    
    shpArray(21).Value = msoDiagram
    shpArray(21).Name = "msoDiagram"
    shpArray(21).Description = "Diagram"
    
    shpArray(22).Value = msoInk
    shpArray(22).Name = "msoInk"
    shpArray(22).Description = "Ink"
    
    shpArray(23).Value = msoInkComment
    shpArray(23).Name = "msoInkComment"
    shpArray(23).Description = "Ink Comment"
    
    shpArray(24).Value = 24
    shpArray(24).Name = "msoIgxGraphic"
    shpArray(24).Description = "SmartArt graphic"

End Sub