DIAdem Help

Method: Item for ReportObjects

  • Updated2024-09-12
  • 1 minute(s) read

Method: Item for ReportObjects

Returns the object that is associated with a specific name or with a specific index.

Set oReportObject = Object.Item(NameOrIndex)
ObjectReportObjects
Object with this method
NameOrIndexVariant
Specifies the name or the index of the object.
oReportObjectReportObject
Returned object
Note  You can always omit the Item method because it is the standard element of the collection.

The following example displays the types and the names of all the objects in the current worksheet:

VBScriptPython

 

Dim oMyObjects, i, sOutput
sOutput = ""
Set oMyObjects = Report.ActiveSheet.Objects
For i = 1 to oMyObjects.Count
  sOutput = sOutput & "Object type: " & oMyObjects.Item(i).ObjectType & vbTab & _
                      "Element name: " & oMyObjects.Item(i).Name & vbCrLf
Next
Call MsgBoxDisp(sOutput)

Log in to get a better experience