Object: 2DTableSelectedElement
- Updated2024-09-12
- 1 minute(s) read
(2DTable | Collections) > 2DTableSelectedElements > Object: 2DTableSelectedElement
Object: 2DTableSelectedElement
The 2DTableSelectedElement object provides a selected element from a 2D table in DIAdem REPORT.
The following example checks whether elements of a 2D table are selected in the current worksheet and displays the name of the table, the number of selected elements, and their type:
| VBScript | Python |
Dim oMyReportObj, oMyReportObjects, oMySelection, sOutput, i Set oMyReportObjects = Report.ActiveSheet.Objects For Each oMyReportObj in oMyReportObjects If oMyReportObj.ObjectType = eReportObject2DTable Then Set oMySelection = oMyReportObj.SelectedElements sOutput = "Object name: " & oMyReportObj.Name & vbCrLf &_ "Number of selected elements: " & oMySelection.Count & vbCrLf For I = 1 to oMySelection.Count sOutput = sOutput & "Element type: " & oMySelection.Item(i).Type & vbCrLf Next Call MsgBoxDisp(sOutput) End If Next
Properties
Returned From
2DTableSelectedElements.Add2DTable | 2DTableSelectedElements.Item