DeleteSelected Method
Deletes selected objects from a Report collection.
Syntax
Report.DeleteSelected
Applies To
Discussion
Use this method in conjunction with the Select method. After objects are selected in a collection using Select, you can remove them using DeleteSelected.
Return Type
Boolean
Example
This example searches for and deletes all rows that begin with "Star."
Sub Main()
Dim objPPRep As Object
Dim intFound As Integer
Const begins_with = 2
Const current_layer = False
Const rows = 1
Set objPPRep = GetObject(, "CognosPowerPlay.Report")
objPPRep.Rows.Item(1).Activate
intFound = 1
Do
intFound = objPPRep.FindNext("Star", begins_with,
_
current_layer, rows)
If intFound = -1 Then
objPPRep.Rows.Active.Select
objPPRep.DeleteSelected
End If
Loop While intFound <> 0
Set objPPRep = Nothing
End Sub