Microsoft Office Suite
49
Commands
add item to combobox .................................................................................................................................................49
clear combobox .............................................................................................................................................................49
execute ...........................................................................................................................................................................50
get combobox item .......................................................................................................................................................50
get count of combobox items ......................................................................................................................................51
remove an item from combobox.................................................................................................................................51
reset ................................................................................................................................................................................52
show balloon.................................................................................................................................................................52
Command: add item to combobox
Adds a list item to the specified command bar combo box control. The combo box control must be a
custom control, and it must be either a drop-down list box or a combo box.
Note This command will fail if it's applied to an edit box or a built-in combo box control.
Syntax
add item to combobox command bar combobox Required. An expression that returns a
command bar combobox object
combobox item Unicode text Required. The text to be added to the specified control.
[entry index small integer] Optional. The position of the specified item in the list. If this
argument is omitted, the item is added at the end of the list.
Example
This example adds a combo box control to a command bar. Two items are added to the control, and
the number of line items and the width of the combo box are set.
set myBar to make new command bar with properties ¬
{bar type:normal command bar, name:"New"}
set myControl to make new command bar control at myBar¬
with properties {control type:control combobox, combobox text:"Monday",¬
combobox style:combobox style label, drop down lines:2, drop down width:75}
add item to combobox myControl combobox item "Monday" entry index 1
add item to combobox myControl combobox item "Tuesday" entry index 2
Command: clear combobox
Removes all list items from the specified command bar combo box control (drop-down list box or
combo box) and clears the text box (edit box or combo box).
Note This method will fail if it's applied to a built-in command bar control.
Syntax
clear combobox command bar combobox Required. An expression that returns a command bar
combobox object.