Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default HELP!!! problem with list boxes

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default HELP!!! problem with list boxes

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.

--
Regards,
Tom Ogilvy


"marsou" wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP!!! problem with list boxes


Can you make your list box longer on your user form, or maybe its your
userfrom that needs to be longer or both!


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=517282

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default HELP!!! problem with list boxes

It is not a userform. It is an excel sheet.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default HELP!!! problem with list boxes

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.....
:((((



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default HELP!!! problem with list boxes

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.

--
Regards,
Tom Ogilvy


"marsou" wrote in message
oups.com...
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.....
:((((



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HELP!!! problem with list boxes


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

--
Jimbo
-----------------------------------------------------------------------
Jimbo1's Profile: http://www.excelforum.com/member.php...fo&userid=3063
View this thread: http://www.excelforum.com/showthread.php?threadid=51728

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting subsets using combo boxes or list boxes CLamar Excel Discussion (Misc queries) 0 June 1st 06 07:43 PM
Questions on combo boxes and list boxes. Marc New Users to Excel 1 March 14th 06 09:40 AM
About list boxes keith Excel Programming 4 May 16th 05 01:54 PM
List boxes Joe Powers Excel Programming 4 July 30th 04 02:41 PM
List boxes/combo boxes Tibow Excel Programming 3 February 17th 04 12:35 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"