删除列表框上的滚动条

时间:2022-06-04 09:38:02

I'm using a userForm in vba and I have a list box. I want to remove the horoz. scroll bar from the bottom. Is there a way to do this? I don't see any option in the properties box.

我在vba中使用userForm,我有一个列表框。我想删除horoz。滚动条从底部。有没有办法做到这一点?我没有在属性框中看到任何选项。

删除列表框上的滚动条

5 个解决方案

#1


8  

This can occur when you have the column width format property of the listbox set to something wide, then you size the control to the data, it will show the scroll bars.

当列表框的列宽格式属性设置为宽,然后将控件的大小设置为数据时,会出现这种情况,它将显示滚动条。

To fix this, change the "Column Width" property under the format tab to something really small, then play around with this property and the size of the listbox control until you get it how you want, and no scroll bars are displayed.

要解决此问题,请将格式选项卡下的“列宽”属性更改为非常小的内容,然后使用此属性和列表框控件的大小,直到获得所需内容,并且不显示滚动条。

#2


0  

Try making the listbox a little wider.... not mucn wider, but just enough to get rid of the horizontal scroll bar.

尝试使列表框更宽......不要更宽,但足以摆脱水平滚动条。

Maybe that will work.

也许那会奏效。

#3


0  

Click on the Userform. Under the Property Stats, look for KeepScrollBarsVisible.
Change it to 0 - fmScrollBarsNone

单击Userform。在Property Stats下,查找KeepScrollBarsVisible。将其更改为0 - fmScrollBarsNone

I was working with this for two hours - trying to find the answer in the ListBox. It is NOT there!

我正在使用它两个小时 - 试图在ListBox中找到答案。它不存在!

Jim

吉姆

#4


0  

I declared columnwidth in start of form and it works like a charm!

我在表格的开头声明了列宽,它就像一个魅力!

#5


0  

You need to set the property ListWidth of the listbox or combobox bigger than the property ColumnWidth.

您需要将列表框或组合框的属性ListWidth设置为大于属性ColumnWidth的属性。

The first beeing the size of what you show on screen, and the second beeing the size of what you want to put inside the first.

第一个是你在屏幕上显示的大小,第二个是你想要放在第一个内容的大小。

#1


8  

This can occur when you have the column width format property of the listbox set to something wide, then you size the control to the data, it will show the scroll bars.

当列表框的列宽格式属性设置为宽,然后将控件的大小设置为数据时,会出现这种情况,它将显示滚动条。

To fix this, change the "Column Width" property under the format tab to something really small, then play around with this property and the size of the listbox control until you get it how you want, and no scroll bars are displayed.

要解决此问题,请将格式选项卡下的“列宽”属性更改为非常小的内容,然后使用此属性和列表框控件的大小,直到获得所需内容,并且不显示滚动条。

#2


0  

Try making the listbox a little wider.... not mucn wider, but just enough to get rid of the horizontal scroll bar.

尝试使列表框更宽......不要更宽,但足以摆脱水平滚动条。

Maybe that will work.

也许那会奏效。

#3


0  

Click on the Userform. Under the Property Stats, look for KeepScrollBarsVisible.
Change it to 0 - fmScrollBarsNone

单击Userform。在Property Stats下,查找KeepScrollBarsVisible。将其更改为0 - fmScrollBarsNone

I was working with this for two hours - trying to find the answer in the ListBox. It is NOT there!

我正在使用它两个小时 - 试图在ListBox中找到答案。它不存在!

Jim

吉姆

#4


0  

I declared columnwidth in start of form and it works like a charm!

我在表格的开头声明了列宽,它就像一个魅力!

#5


0  

You need to set the property ListWidth of the listbox or combobox bigger than the property ColumnWidth.

您需要将列表框或组合框的属性ListWidth设置为大于属性ColumnWidth的属性。

The first beeing the size of what you show on screen, and the second beeing the size of what you want to put inside the first.

第一个是你在屏幕上显示的大小,第二个是你想要放在第一个内容的大小。