Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 VBA 的 ComboBox 中为项目添加换行符?
Private Sub UserForm_Initialize() ComboBox1.List = Array("Test1","Test2", "Test3" & Chr(13) & "more text") End Sub
在上面添加Chr(13)实际上添加了一个段落符号而不是换行符。
Chr(13)
您可能需要可变大小的项目。
MSForms 组合框是一个无窗口(轻量级)控件,不支持此功能。