Items (Collection)

Member of:

Legend object

Description:

Represents all legend items.

Tip:

All collections have the “Item(NameOrIndex)” method. This is the default method for all collections that returns collection items at a particular index or by name. Use brackets ([]) to represent calls to the Item (Method). For example, these statements are identical: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy")

Example:

This example shows how to count legend items in an Alert box.

Alert(ActiveDocument.Sections["Chart"].Legend.Items.Count)

Methods:

Item(Value NameOrIndex)

Properties:

Read-only: Count as Number