Excel 2007 listbox width problem

D

dsimcox

I have a multicolumn listbox that has a defined height and width.
IntegralHeight is set to true.

Sometimes, when the userform containing the listBox is opened, the width of
the listbox has shrunk so that some of the columns are not visible. If I
click on the listbox, it will expand to the correct width.

I've tried everything I can think of to get the listbox to size properly
when opened, including re-defining the Height and Width properties in the
code that is executed when the userform opens, but without success.

Is there a way to make the listbox behave better?
 
J

Joachim Bruer

I had the sam problem
This solves, I have no idea. Give the width after opening and draw it again.
Must be a bug, because the width is correctly when I go through the code in DEBUG-Mode

Private Sub CommandButton1_Click()
Userform1.Show
Userform1.MyListbox.Width = 960
Userform1.Width = Userform1.Width 'don't make any sense End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top