DropDowns Collection Object

Description

A collection of all the DropDown objects on the specified chart sheet, dialog sheet, or worksheet. Each DropDown object represents a drop-down list box or a combination drop-down edit box. A user can click an item in the drop-down list or, in combination drop-down edit boxes, type text in the edit box.

Accessors

Use the Add method to create a drop-down list box and add it to the collection. Set the editable argument to True to create a combination drop-down edit box (you can only create a combination drop-down edit box on a dialog sheet). The following example adds a new drop-down list box to dialog sheet one. The new drop-down list box is positioned relative to the upper-left corner of the dialog frame.


Dim df As DialogFrame
Set df = DialogSheets(1).DialogFrame
DialogSheets(1).DropDowns.Add df.Left + 10, df.Top + 20, 100, 10

Use the DropDowns 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 sets the Value property for all the drop-down list boxes on dialog sheet one; each drop-down list box on the sheet will initially display the first item in its list the next time the dialog sheet runs.


DialogSheets(1).DropDowns.Value = 1

Properties

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

Methods

Add Method (DropDowns Collection), AddItem Method, BringToFront Method, Characters Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Group Method, Item Method, RemoveAllItems Method, RemoveItem Method, Select Method, SendToBack Method.