Labels Collection Object

Description

A collection of all the Label objects on the specified 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

Use the Add method to create a new label and add it to the collection. The following example adds a new label to dialog sheet one. The upper-left corner of the new label is positioned 10 points from the left and 20 points from the bottom of the dialog frame.


Dim df As DialogFrame
Set df = DialogSheets(1).DialogFrame
DialogSheets(1).Labels.Add df.Left + 10, _
    df.Top + df.Height - 20, 100, 10

Use the Labels method with an argument to access a single member of the collection or without an argument to access the entire collection at once. The following example deletes all the labels on the dialog sheet named "Dialog1."


DialogSheets("dialog1").Labels.Delete

Properties

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

Methods

Add Method (Graphic Objects and Controls), BringToFront Method, Characters Method, CheckSpelling Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Group Method, Item Method, Select Method, SendToBack Method.