Labels Method

Applies To

Chart Object, DialogSheet Object, Worksheet Object.

Description

Accessor. Returns an object that represents a single label (a Label object, Syntax 1) or a collection of labels (a Labels object, Syntax 2) on the sheet.

Syntax 1

object.Labels(index)

Syntax 2

object.Labels

object

Required. The Chart, DialogSheet or Worksheet object.

index

Required for Syntax 1. Specifies the name or number of the label (can be an array to specify more than one).

Example

This example sets the text for label one on Dialog1.


DialogSheets("Sheet1").Labels(1).Text = "Search results"