Depth Property

Microsoft Excel Visual Basic

Show All

Depth Property

       

Depth property as it applies to the ThreeDFormat object.

For the ThreeDFormat object, returns or sets the depth of the shape's extrusion. Can be a value from  – 600 through 9600 (positive values produce an extrusion whose front face is the original shape; negative values produce an extrusion whose back face is the original shape). Read/write Single.

expression.Depth

expression   Required. An expression that returns a ThreeDFormat object.

Depth property as it applies to the TickLabels object.

For the TickLabels object, returns the number of levels of category tick labels. Read-only Long.

expression.Depth

expression   Required. An expression that returns a TickLabels object.

Example

This example adds an oval to myDocument and then specifies that the oval be extruded to a depth of 50 points and that the extrusion be purple.

Set myDocument = Worksheets(1)
Set myShape = myDocument.Shapes.AddShape(msoShapeOval, _
    90, 90, 90, 40)
With myShape.ThreeD
    .Visible = True
    .Depth = 50
    ' RGB value for purple
    .ExtrusionColor.RGB = RGB(255, 100, 255)
End With