Label Object

Description

Represents a static text object on a chart sheet, dialog sheet, or worksheet. Labels have no font or background formatting, but labels on dialog sheets do have an accelerator key. Labels can be positioned and sized.

Accessors

The Label object is a member of the Labels collection. The Labels collection contains all the Label objects on a single sheet. Use the Add method to create a new label and add it to the collection.

To access a single member of the collection, use the Labels method with the index number or name of the label as an argument.

The following example sets the text in label one on the dialog sheet named "Dialog1."


DialogSheets("dialog1").Labels(1).Text = "Options"

The label name is shown in the Name Box when the label is selected. Use the Name property to set or return the label name. The following example hides the label named "Option Label" on the dialog sheet named "Dialog1."


DialogSheets("dialog1").Labels("option label").Visible = False

Properties

Accelerator Property, Application Property, BottomRightCell Property, Caption Property, Creator Property, Enabled Property, Height Property, Index Property, Left Property, Locked Property, LockedText Property, Name Property, OnAction Property, Parent Property, PhoneticAccelerator Property, Placement Property, PrintObject Property, Text Property, Top Property, TopLeftCell Property, Visible Property, Width Property, ZOrder Property.

Methods

BringToFront Method, Characters Method, CheckSpelling Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Select Method, SendToBack Method.