![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
I have a list box that I'm filling dynamically (depends on the file being opened, there could be 1 item and there could be up to 100). When I'm done adding items, etc., I'm not able to scroll to the last item. The microsoft link below does not satisfy what I want to do. I don't want the list box to be as long as the list - I'm fine with the user scrolling to find what they want.
Here's what I've tried so far:
None of these has worked. I am using fixed numbers to set the height (this refers to the link below). Any suggestions? -Russell http://support.microsoft.com/default...;EN-US;Q211696 [ This Message was edited by: Russell Hauf on 2002-05-07 15:14 ] [ This Message was edited by: Russell Hauf on 2002-05-07 15:14 ] |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Just a wild stab...can you add a blank as the last item, or even something like --- and see if that shows up?
It may not show up and the last item you really want does. If this shows up and the real last item doesn't there are some referencing issues. If all show up, you may need to handle if the user selects the --- item. Bye, Jay EDIT: Disregard this, as I didn't see item 3 in what you've tried already. Sorry. [ This Message was edited by: Jay Petrulis on 2002-05-07 16:51 ] |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
Quote:
and, what's your dynamic formula ? everything else looks cast-iron kosher : but these two look potentially suspect... |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
No formula, through code. Everything works but scrolling to the last row. What I've done is to add an extra item in my ListBox (that won't be seen), and coded around it. It works, but I'd still like to know how to fix this obvious bug.
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Sep 2003
Posts: 14
|
very annoying bug this, i too would be keen to see some code to side step it if anyone has managed to do so.
|
|
|
|
|
|
#6 |
|
New Member
Join Date: Mar 2005
Posts: 1
|
I know this is an old post, but I was having this same problem and figure out a fix. Simply change the text alignment of the listbox. Voila. You can now scroll to the bottom and see the last item. You can change it back and it seems to remain fixed. Just thought I'd post it as I could not find a fix posted anywhere.
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Dec 2005
Location: Chicago
Posts: 41
|
Hi all,
I'm having the same problem... but figured it out! flash281... changing the text alignment doesn't seem to work for me. Besides, then I can't have the text aligned to the left. What you need to do it change the 'Integral Height' field to true. This may and probably will change the size of your listbox, but you'll always be able to see the last item in the box. Happy exceling! s_c |
|
|
|
|
|
#8 |
|
New Member
Join Date: Mar 2009
Posts: 1
|
Just one more pecision. The integralheight property first needs to be set to False, then add items to your listbox and then set integralheight = true.
This has done it for me Hope this helps. DarthVador |
|
|
|
|
|
#9 |
|
New Member
Join Date: Aug 2006
Posts: 48
|
This was a very useful post. Thanks! I was having the same issues (font size changed when listbox was reloaded) and users couldn't scrool down to last list item if list went beyond box.
Changing the listbox's IntegralHeight setting to TRUE, filling list using code, and then changing setting to TRUE fixed *both* of these very annoying issues. |
|
|
|
|
|
#10 |
|
New Member
Join Date: Aug 2006
Posts: 48
|
UPDATE: Well, actually this code did NOT fix the font increasing problem. It returned soon after when doing more testing.
However, I found that while troubleshooting if I put a break on the code after I fill the listbox, then ran through until the end the listbox font was fine. This led me to put a brief (< 1 second) pause in the code at the end of my WITH statement and for now it seems to be working. Maybe this is an issue with the PC's processor? Application.Wait (Now + TimeValue("0:00:01") * .5) |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|