使用 Excel VBA 调整列表框以显示比列表框宽度更长的字符串

Adjust listbox to display string longer than listbox width using Excel VBA

在我的列表框中,字符串比列表框的宽度长。

我无法更改列表框宽度,因为已经完成了表面设计:

列表框是否有 VBA 属性:

break the string in half and display it on more than one line

scroll horizontally, to see the whole string

如果没有那种属性,我想知道其他想法。

ListBox只有单行,不支持换行。

如果它是 ActiveX,那么它有一个名为 ColumnWidths 的 属性。将其设置为更大的值,例如 500,您将在列表框的底部看到一个滚动条。