April 2006
Beginner
1114 pages
98h 16m
English
shape.SetShapesDefaultProperties( )
Makes the shape’s formatting the default formatting for all subsequent shapes. Use the PickUp and Apply methods to copy formatting from one shape to another. The following code draws a star, sets its fill, and then makes that formatting the default:
Sub Defaults( )
Dim ws As Worksheet, s As Shape
Set ws = ActiveSheet
' Draw star
Set s = ws.Shapes.AddShape(msoShape5pointStar, 50, 50, 40, 40)
' Set its fill.
s.Fill.PresetGradient msoGradientDiagonalUp, 1, msoGradientChrome
' Make this the default style.
s.SetShapesDefaultProperties
' Draw another star.
Set s = ws.Shapes.AddShape(msoShape5pointStar, 90, 90, 40, 40)
End SubRead now
Unlock full access