ColumnCount Property

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

Specifies the number of columns to display in a list box or combo box.


object.ColumnCount [= Long]

The ColumnCount property syntax has these parts:




Required. A valid object.


Optional. Specifies the number of columns to display.


If you set the ColumnCount property for a list box to 3 on an employee form, one column can list last names, another can list first names, and the third can list employee ID numbers.

Setting ColumnCount to 0 displays zero columns, and setting it to -1 displays all the available columns. For an unbounddata source, there is a 10-column limit (0 to 9).

You can use the ColumnWidths property to set the width of the columns displayed in the control.