Udostępnij za pośrednictwem


WorksheetBase.Shapes Property

Definition

Gets a Shapes object that represents all the shapes on the worksheet.

public:
 property Microsoft::Office::Interop::Excel::Shapes ^ Shapes { Microsoft::Office::Interop::Excel::Shapes ^ get(); };
public Microsoft.Office.Interop.Excel.Shapes Shapes { get; }
member this.Shapes : Microsoft.Office.Interop.Excel.Shapes
Public ReadOnly Property Shapes As Shapes

Property Value

A Shapes object that represents all the shapes on the worksheet.

Examples

The following code example uses the Shapes property to add a doughnut shape to the current worksheet.

This example is for a document-level customization.

private void AddDonutShape()
{
    Excel.Shape textBox = this.Shapes.AddShape(
        Office.MsoAutoShapeType.msoShapeDonut, 50, 50, 150, 150);
}
Private Sub AddDonutShape()
    Dim textBox As Excel.Shape = _
        Me.Shapes.AddShape(Office.MsoAutoShapeType.msoShapeDonut, _
        50, 50, 150, 150)
End Sub

Applies to