问题
I have a label on a userForm and the data within it is in list form. The data is longer than the label. Without expanding the label, is there a way to add a scroll bar to it? Or is there another option? Basically I want a box that does not have a scroll bar unless the list is longer than the box, then there's a scroll bar.
Using Excel vba userForm
回答1:
You can used a textbox styled to look like a label. Set it to multiline with scrollbars set to vertical. Scrollbars will only show up if the content exceeds the size.
来源:https://stackoverflow.com/questions/5667403/adding-a-scroll-bar-to-a-label