您可以处理多列列表框或组合框的事项Things you can do with a multicolumn ListBox or ComboBox

若要控制多列**ListBox** 或**ComboBox** 的列宽, 可以指定**ColumnWidths** 属性中所有列的宽度 (以磅为单位)。To control the column widths of a multicolumn ListBox or ComboBox, you can specify the width, in points, for all the columns in the ColumnWidths property. 为特定的列指定零会将显示中的信息列隐藏起来。Specifying zero for a specific column hides that column of information from the display.

如果要向用户隐藏ListBoxComboBox的除一列之外的所有列, 可以将其他列的列宽设置为零, 并通过将其ColumnWidths属性设置为来标识要显示的信息列。默认值, 使用**TextColumn** 属性。If you want to hide all but one column of a ListBox or ComboBox from the user, you can set the ColumnWidths of the other columns to zero and identify the column of information to display by leaving its ColumnWidths property set to the default value and by using the TextColumn property. 当用户选择某一行时, 该控件的**Text** 属性将设置为由TextColumn属性标识的列的值。When the user selects a row, the Text property of the control is set to the value of the column identified by the TextColumn property. 在组合框中,系统显示由控件的文本框部分的 TextColumn 属性指定的列。In a combo box, the system displays the column designated by the TextColumn property in the text box portion of the control.

同样, 您可以通过在**BoundColumn** 属性中指定列号来控制在用户做出选择时用于控件的值的列。Similarly, you can control which column of values is used for the control when the user makes a selection by specifying the column number in the BoundColumn property.

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.