Property: SelectedElements for 2DTable

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2012 Help
DIAdem 2014 Help
DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help

Returns a collection of all selected elements of a 2D table in DIAdem REPORT.

Set o2DTableSelectedElements = Object.SelectedElements
Object2DTable
Object with this property
o2DTableSelectedElements2DTableSelectedElements
Returned object

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:

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

WAS THIS ARTICLE HELPFUL?

Not Helpful