ComboBox.Count
The ComboBox Control Object that is returned by the AddComboBox function has a Count property. The Count property returns a number that corresponds to the number of options in the Combo Box list.
Syntax |
ControlObject.Count Where ControlObject. is the name of the variable (declared in your script) that is used to store the Combo Box Control Object that is returned by the AddComboBox function. |
Description |
Returns a numeric value that matches the total number of options in the Combo Box's list. The Count property is read only. |
Arguments |
None. |
Returns |
Integer (the total number of options in the Combo Box's list). |
Example:
A Combo Box has 6 options. In the script, the following script is used to display a message box containing a count of the options:
MsgBox ComboBox1.Count
Where:
- ComboBox1 is the name of the variable that is used to store the ComboBox Control Object that is returned by the AddComboBox function. When the script is executed, a message box is displayed containing the number 6 (the total number of options in the Combo Box's list).