Scrollbars in Listbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,

Is there any way to disable horizontal scroll bar in Listbox in VBA form.

I am just adding A-Z to that listbox with checkbox option, but horizontal
scroll bar is attached to it automatically.

When i adjust the width, it goes off, but i don't want to do this, as it
will spoil my design.

I checked the properties and the methods, there is no mention of scrollbar
anywhere.

Any help would be highly appreciated.

Thanks
 
If you play with the .width and .columnwidth, maybe you can get it to work the
way you want.

This worked for me:

Option Explicit
Private Sub UserForm_Initialize()
Dim iCtr As Long

With Me.ListBox1
.ListStyle = fmListStyleOption
.Width = 55
.ColumnWidths = 35
For iCtr = Asc("A") To Asc("Z")
.AddItem Chr(iCtr)
Next iCtr
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top