'Declaration Public Overloads Sub Add( _ ByVal shape As WorksheetShape _ )
public void Add( WorksheetShape shape )
Exception | Description |
---|---|
System.ArgumentNullException | shape is null. |
System.InvalidOperationException | shape has already been added to a worksheet or group. |
System.InvalidOperationException | shape does not have the TopLeftCornerCell or BottomRightCornerCell set. |
System.InvalidOperationException | Adding shape to this collection will place it on a different worksheet then either its TopLeftCornerCell or BottomRightCornerCell or shape is a WorksheetShapeGroup and adding it to this collection will create a similar situation for one of its descendant shapes. |
System.InvalidOperationException | shape is a WorksheetShapeGroup and this is the group's collection of shapes. |
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2