Udostępnij za pośrednictwem


Worksheet.Shapes Property (2007 System)

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

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Shapes As Shapes
'Usage
Dim instance As Worksheet 
Dim value As Shapes 

value = instance.Shapes
[BrowsableAttribute(false)]
public Shapes Shapes { get; }
[BrowsableAttribute(false)]
public:
property Shapes^ Shapes {
    Shapes^ get ();
}
public function get Shapes () : Shapes

Property Value

Type: Shapes
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 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 Security

See Also

Reference

Worksheet Class

Worksheet Members

Microsoft.Office.Tools.Excel Namespace