Share via


Shape.Delete Method

Visio Automation Reference

Deletes an object or selection.

Version Information
 Version Added:  Visio 2.0

Syntax

expression.Delete

expression   A variable that represents a Shape object.

Return Value
Nothing

Remarks

Example

This example shows how to delete Shape objects.

Visual Basic for Applications
  
Public Sub Delete_Example() 
Dim vsoShape As Visio.Shape 

Set vsoShape = ActivePage.DrawLine(1, 1, 5, 5) 

vsoShape.Delete 

End Sub

See Also