WorksheetBase.Shapes-Eigenschaft

Ruft ein Microsoft.Office.Interop.Excel.Shapes-Objekt ab, das alle Formen im Arbeitsblatt darstellt.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public ReadOnly Property Shapes As Shapes
public Shapes Shapes { get; }

Eigenschaftswert

Typ: Microsoft.Office.Interop.Excel.Shapes
Ein Microsoft.Office.Interop.Excel.Shapes-Objekt, das alle Formen auf dem Arbeitsblatt darstellt.

Beispiele

Im folgenden Codebeispiel wird die Shapes-Eigenschaft verwendet, um dem aktuellen Arbeitsblatt eine Ringform hinzuzufügen.

Dieses Beispiel bezieht sich auf eine Anpassung auf Dokumentebene.

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

.NET Framework-Sicherheit

Siehe auch

Referenz

WorksheetBase Klasse

Microsoft.Office.Tools.Excel-Namespace