ChCategoryLabels Collection Object

Microsoft Office Web Components Visual Basic

ChCategoryLabels Collection Object

ChAxis ChCategoryLabels
Multiple objects

Represents a collection of all the ChCategoryLabel objects for the specified category axis.

Using the ChCategoryLabels Collection Object

Use the CategoryLabels property of the ChAxis object to return a ChCategoryLabels collection. The following example displays the number of labels for the category axis on the first chart in Chartspace1.

Sub DisplayItemCount

   Dim chtChart1
   Dim chConstants
    
   Set chConstants = Chartspace1.Constants
    
   Set chtChart1 = Chartspace1.Charts(0)
    
   MsgBox chChart1.Axes(chConstants.chAxisPositionCategory) _
          .CategoryLabels.ItemCount

End Sub