Collection: CommentSelectedElements
- Updated2024-09-12
- 1 minute(s) read
(Collections | Comment) > Collection: CommentSelectedElements
Collection: CommentSelectedElements
Collection of all CommentSelectedElement objects in DIAdem REPORT. Use the CommentSelectedElements collection to access a selected element of the comment.
The following example displays the selected elements of a comment:
| VBScript | Python |
Dim oMyReportObj, oMyReportObjects, oMySelection, sOutput sOutput = "" Set oMyReportObjects = Report.ActiveSheet.Objects For Each oMyReportObj in oMyReportObjects If oMyReportObj.ObjectType = eReportObjectComment Then Call MsgBoxDisp("Object name: " & oMyReportObj.Name & _ vbCrLf & "Number of selected elements: " & oMyReportObj.SelectedElements.Count) For Each oMySelection in oMyReportObj.SelectedElements sOutput = sOutput & "Element type: " & oMySelection.Type & vbCrLf Next End If Next Call MsgBoxDisp(sOutput)