Name

shape.Shadow

Synopsis

Returns a ShadowFormat object used to display and set the appearance of a shape’s shadow. The following code draws a star with a shadow:

Sub DrawShadow( )
    Dim ws As Worksheet, s As Shape
    Set ws = ActiveSheet
    ' Draw star
    Set s = ws.Shapes.AddShape(msoShape5pointStar, 50, 50, 40, 40)
    ' Add a shadow.
    s.Shadow.Type = msoShadow1
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.