Hi all,
I got this code to fill my listbox;
When the width is 725 the listbox is "1 single line"
As you can see the listbox is to long now, i want it shorter.
But when i reduce it below 725 the listbox will sundely be double.
I don't want this.
This is width 625;
When i count the columnwidhts in my code i count 600.
So i should be able to reduce the width to 600?
Why is this happening?
I got this code to fill my listbox;
VBA Code:
Option Explicit
Dim Ary As Variant
Private Sub UserForm_Initialize()
Ary = Sheets("BMR data").Range("A1", Sheets("BMR data").Range("A1").Offset(, 22)).Value
With Me.lstSearchHeaders
.ColumnCount = 22
.ColumnWidths = "0;100;0;0;0;0;0;0;0;100;0;0;100;0;0;100;0;0;100;0;0;100"
.List = Ary
End With
End Sub
When the width is 725 the listbox is "1 single line"
As you can see the listbox is to long now, i want it shorter.
But when i reduce it below 725 the listbox will sundely be double.
I don't want this.
This is width 625;
When i count the columnwidhts in my code i count 600.
So i should be able to reduce the width to 600?
Why is this happening?