Shape.Delete method (Visio)

Deletes an object or selection.

Syntax

expression.Delete

expression A variable that represents a Shape object.

Return value

Nothing

Remarks

If your Visual Studio solution includes the Microsoft.Office.Interop.Visio reference, this method maps to the following types:

  • Microsoft.Office.Interop.Visio.IVShape.Delete()

Example

This example shows how to delete Shape objects.

 
Public Sub Delete_Example()  
 
    Dim vsoShape As Visio.Shape  
 
    Set vsoShape = ActivePage.DrawLine(1, 1, 5, 5)  
 
    vsoShape.Delete  
 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.