MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 7th, 2002, 04:13 PM   #1
Russell Hauf
MrExcel MVP
 
Russell Hauf's Avatar
 
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
Default

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:
  • Setting the height to smaller than I want, then back to the height I really want
  • Setting the height to larger than the list, then back to my desired height (when I turn screenupdating on, I can see the last item when the list is made very tall - but it disappears once the height is set smaller again).
  • Adding another item then deleting it

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 ]
Russell Hauf is offline   Reply With Quote
Old May 7th, 2002, 05:35 PM   #2
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

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 ]
Jay Petrulis is offline   Reply With Quote
Old May 8th, 2002, 02:33 PM   #3
Chris Davison
MrExcel MVP
 
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
Default

Quote:
On 2002-05-07 15:13, Russell Hauf wrote:
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).Hauf on 2002-05-07 15:14 ]
What do you mean by "depends on the file being opened"

and, what's your dynamic formula ?

everything else looks cast-iron kosher : but these two look potentially suspect...

Chris Davison is offline   Reply With Quote
Old May 17th, 2002, 09:36 PM   #4
Russell Hauf
MrExcel MVP
 
Russell Hauf's Avatar
 
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
Default

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.
Russell Hauf is offline   Reply With Quote
Old Sep 19th, 2003, 06:56 AM   #5
phoenetia
New Member
 
Join Date: Sep 2003
Posts: 14
Default

very annoying bug this, i too would be keen to see some code to side step it if anyone has managed to do so.
phoenetia is offline   Reply With Quote
Old Mar 11th, 2005, 05:09 PM   #6
flash281
New Member
 
Join Date: Mar 2005
Posts: 1
Default Figured out a fix...

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.
flash281 is offline   Reply With Quote
Old Oct 23rd, 2006, 12:40 PM   #7
scottcolbury
New Member
 
Join Date: Dec 2005
Location: Chicago
Posts: 41
Default Integral Height = True is the fix

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
scottcolbury is offline   Reply With Quote
Old Mar 14th, 2009, 03:52 PM   #8
DarthVador
New Member
 
Join Date: Mar 2009
Posts: 1
Default Re: List Box - not able to scroll to last item

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
DarthVador is offline   Reply With Quote
Old Sep 16th, 2010, 01:17 PM   #9
PaulZak
New Member
 
Join Date: Aug 2006
Posts: 48
Default Re: List Box - not able to scroll to last item

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.
PaulZak is offline   Reply With Quote
Old Sep 16th, 2010, 02:58 PM   #10
PaulZak
New Member
 
Join Date: Aug 2006
Posts: 48
Default Re: List Box - not able to scroll to last item

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)
PaulZak is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes