ThreeDFormat
Use the ThreeDFormat object to add a 3-D effect to shapes. Use the Shape object’s ThreeD property to get a reference to this object. The ThreeDFormat object has the following members:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The ThreeDFormat members correspond to the settings on the 3-D Settings toolbar shown in Figure 18-16.

Figure 18-16. Adding a 3-D effect to shapes
Use the SetThreeDFormat method to apply a 3-D effect to a shape. The following code draws the wave shape shown in Figure 18-16 and applies a 3-D effect to it:
Sub ThreeDFormatMembers( )
Dim ws As Worksheet, s As Shape, fil As String
Set ws = ActiveSheet
' Insert embedded WordArt.
Set s = ws.Shapes.AddShape(msoShapeWave, 20, 140, 40, 30)
s.Fill.Solid
' Apply 3-D effect.
s.ThreeD.SetThreeDFormat msoThreeD1
End SubBecome 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