Hello,
I am experiencing some weird problem with my list box.
The data is added to the list box dynamically from code using AddItem.
After the entry is added I am selecting it in order to show always the
last entered data.
The problem is the following: on some heights of the listbox the last
selected data becomes hidden behind the bottom border of the listbox.
It is obvious that there is data, but I cannot see it neither by
scrolling nor by arrow keys. The funny thing here that this behavior
very much depends on the height of the listbox. If it is something
about 232 I see this behavior. If it is about 76 - everything works
fine.
Did someone see something like this? Or maybe I am doing something
wrong?
Please help me - it is really confusing.
TIA
marsou
Tom Ogilvy - 28 Feb 2006 13:12 GMT
Is the IntegralHeight property of the listbox set to True.
If it is and you still have the problem, then perhaps it is a bug due to
internal cumulative roundoff error in the control.

Signature
Regards,
Tom Ogilvy
> Hello,
>
[quoted text clipped - 15 lines]
> TIA
> marsou
marsou - 28 Feb 2006 13:37 GMT
IntegralHeight is the first thing I thought of. It is set to True... :(
It is really something confusing....The selected item is the one that
is hidden and there is no selection visible. If I press the Up arrow
button the selection goes to the one before the last entered item -
which is the last I see. After that if I press the Down button the
selection hides again and the last visible item remains the same. The
Listbox.Value property holds the value of the last entered data - so I
am sure that there is no error in adding from my side.
It is a ListBox Control on an excel sheet.
I really need to do something with that. I was just wondering isn't
there a better solution than to add a dummy entry in the tail of the
listbox so it would be the one which is hidden if one should be.....
:((((
Tom Ogilvy - 28 Feb 2006 13:47 GMT
If the control doesn't work as it should, then I think you are stuck with
the dummy member or making the listbox longer than the list.

Signature
Regards,
Tom Ogilvy
> IntegralHeight is the first thing I thought of. It is set to True... :(
> It is really something confusing....The selected item is the one that
[quoted text clipped - 9 lines]
> listbox so it would be the one which is hidden if one should be.....
> :((((
Jimbo1 - 22 Mar 2006 16:10 GMT
I've have also experienced this problem with listboxes.
Try this
Worksheets("Sheet1").ListBox1.IntegralHeight = False
<<<Your Code>>>
Worksheets("Sheet1").ListBox1.IntegralHeight = True
This worked for me and will hopefully stop you having to put a dumm
item in your array.
hope you have some joy
davesexcel - 28 Feb 2006 13:16 GMT
Can you make your list box longer on your user form, or maybe its your
userfrom that needs to be longer or both!:confused:

Signature
davesexcel
marsou - 28 Feb 2006 13:30 GMT
It is not a userform. It is an excel sheet.