ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to get rid of the bottom scroll bar in a ListBox (https://www.excelbanter.com/excel-programming/288891-how-get-rid-bottom-scroll-bar-listbox.html)

Valeria[_2_]

How to get rid of the bottom scroll bar in a ListBox
 
Dear Experts,
I would like to insert a ListBox in my userform that
contains several items, and that can be scrolled down with
a scroll-down bar on the right-hand side of the ListBox.
The ListBox shows though with 2 scroll bars, one at the
bottom and one on the right - how can I get rid of the one
at the bottom?
My code for populating the ListBox is:

Sub Show_Userform()
'Fill the listbox1
With UserForm1.ListBox1
.RowSource = ""
.AddItem "01"
.AddItem "02"
.AddItem "21"
.AddItem "30"
.AddItem "31"
.AddItem "38"
.AddItem "50"
.AddItem "72"
End With
UserForm1.Show 0
End Sub


Many thanks in advance.
Best regards,
Valeria

Chip Pearson

How to get rid of the bottom scroll bar in a ListBox
 
Valeria,

You typically get a scroll bar at the bottom of the list box when
VBA things that the list is not wide enough. Increase the width
of the list box.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Valeria" wrote in message
...
Dear Experts,
I would like to insert a ListBox in my userform that
contains several items, and that can be scrolled down with
a scroll-down bar on the right-hand side of the ListBox.
The ListBox shows though with 2 scroll bars, one at the
bottom and one on the right - how can I get rid of the one
at the bottom?
My code for populating the ListBox is:

Sub Show_Userform()
'Fill the listbox1
With UserForm1.ListBox1
.RowSource = ""
.AddItem "01"
.AddItem "02"
.AddItem "21"
.AddItem "30"
.AddItem "31"
.AddItem "38"
.AddItem "50"
.AddItem "72"
End With
UserForm1.Show 0
End Sub


Many thanks in advance.
Best regards,
Valeria




Nigel[_8_]

How to get rid of the bottom scroll bar in a ListBox
 
I don't think you can remove it, but if you set the column width property to
a value greater than your data item width the scroll bar should be off.
Cheers
Nigel

"Valeria" wrote in message
...
Dear Experts,
I would like to insert a ListBox in my userform that
contains several items, and that can be scrolled down with
a scroll-down bar on the right-hand side of the ListBox.
The ListBox shows though with 2 scroll bars, one at the
bottom and one on the right - how can I get rid of the one
at the bottom?
My code for populating the ListBox is:

Sub Show_Userform()
'Fill the listbox1
With UserForm1.ListBox1
.RowSource = ""
.AddItem "01"
.AddItem "02"
.AddItem "21"
.AddItem "30"
.AddItem "31"
.AddItem "38"
.AddItem "50"
.AddItem "72"
End With
UserForm1.Show 0
End Sub


Many thanks in advance.
Best regards,
Valeria





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


All times are GMT +1. The time now is 01:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com