Method: Item for ReportObjects
- Updated2024-09-12
- 1 minute(s) read
DIAdem REPORT > Methods > Method: Item for ReportObjects
Method: Item for ReportObjects
Returns the object that is associated with a specific name or with a specific index.
Set oReportObject = Object.Item(NameOrIndex)
Object | ReportObjects Object with this method |
NameOrIndex | Variant Specifies the name or the index of the object. |
oReportObject | ReportObject 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:
VBScript | Python |
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)