API Documentation > CorelDRAW > 2025-v26 > View > IVGView
View.Delete method
Deletes the view
Syntax:
Sub Delete()
Remarks:
The Delete method deletes a saved view from the View Manager.
Examples:
The following VBA example deletes all views in the document.
Sub Test()
Dim Vw As View
Dim intCounter As Integer
For intCounter = ActiveDocument.Views.Count To 1 Step -1
  Set Vw = ActiveDocument.Views(intCounter)
  Vw.Delete
Next intCounter
Set Vw = Nothing 
End Sub Sub Test()
Dim Vws As Views
Set Vws = ActiveDocument.Views
While Vws.Count <> 0
  Vws(Vws.Count).Delete
Wend
Set Vws = Nothing 
End Sub