ListBoxes Collection Object

Description

A collection of all the ListBox objects on the specified chart sheet, dialog sheet, or worksheet. List boxes that are linked to edit boxes to form combination list edit boxes are included in the ListBoxes collection.

Accessors

Use the Add method to create a new list box and add it to the collection. The following example adds a new list box to the dialog sheet named "Dialog1." The new list box is positioned relative to the upper-left corner of the dialog frame.


Dim df As DialogFrame
Set df = DialogSheets("dialog1").DialogFrame
DialogSheets("dialog1").ListBoxes.Add df.Left + 10, _
    df.Top + 20, 100, 100

Use the ListBoxes 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 of the list boxes on the dialog sheet named "Dialog1."


DialogSheets("dialog1").ListBoxes.Delete

Properties

Application Property, Count Property, Creator Property, Display3DShading Property, Enabled Property, Height Property, Left Property, LinkedCell Property, List Property, ListFillRange Property, ListIndex Property, Locked Property, MultiSelect Property, OnAction Property, Parent Property, Placement Property, PrintObject Property, Selected Property, Top Property, Value Property, Visible Property, Width Property, ZOrder Property.

Methods

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