ShadowFormat
Use the ShadowFormat object to add shadows to Shape objects. Use the Shape object’s Shadow property to get a reference to this object. The ShadowFormat object has the following members:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The ShadowFormat members correspond to the settings on the shadow toolbars shown in Figure 18-14.

Figure 18-14. Adding shadows
To add a shadow to a shape, simply make the ShadowFormat object visible or set its Type property as shown here:
Sub ShadowFormatMembers( )
Dim ws As Worksheet, s As Shape, fil As String
Set ws = ActiveSheet
' Draw a rectangle.
Set s = ws.Shapes.AddShape(msoShapeRectangle, 50, 50, 40, 60)
' Make it solid.
s.Fill.Solid
' Set shadow type.
s.Shadow.Type = msoShadow3
End SubIf the shape is not solid, the shadow reflects the border of the object.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access