List Box Resizing problems

Ran in to an old friend today, and it took me a while to remember what to do. After adding a list box to your user form, you’ll want to resize it so that it looks nice. At design time you can get all your controls lined up without too much effort. Like this:

DesignTime.JPG

However when the form is run, the list box automatically resizes itself! Like this!

RunTime.JPG

The answer is to change the a default setting, the “IntegralHeight”, and problem solved. The difference is that now your list box will show parts of lines that don’t fill the list box exactly, rather than resizing to accommodate only whole lines.

fixed.JPG

Comments

  1. Eric says:

    Very cool. Solved a headache. Thanks.

  2. Chris says:

    Thanks! Quick and easy fix to problem I was having.

Submit a Comment