Microsoft Excel - ListBox Changing Size
Asked By Mike M. on 23-Mar-12 03:03 PM
Hello,
I have a worksheet with a listbox (ActiveX control), that changes size when other users open the file on their PC's.
The number of items in the listbox does not change.
In the properties, I have IntegralHeight set to False.
Any other ideas?
Thanks
kalpana aparnathi replied to Mike M. on 23-Mar-12 03:10 PM
hi,
Try this way:
Me.yourlistbox.List = worksheet.Range(yourrange).Cells.Value;
Regards,
Mike M. replied to kalpana aparnathi on 23-Mar-12 03:59 PM
This doesn't seem to help. The size (dimensions) of the listbox still change from one PC to the next.
Donald Ross replied to Mike M. on 23-Mar-12 04:54 PM
When you look at the list box and right click look at format control rather than properties and under format control see if the Dont' Move or Size with cells option works for you
Somesh Yadav replied to Mike M. on 26-Mar-12 08:16 AM
I don't know exactly why, without seeing your example or code but try these things.
Go to the Developer Tab and click on Design Mode and then click your ListBox.
Then Right Click on the box and click on Format Control.
Look at the Properties tab and see if you have Move and SIZE with cells. Change this to Move but DON'T size with cells.
You can look at the Size Tab on the Format Control Dialog but I don't
know if any of this would change the behavior you are seeing.
Right Click on the List box a second time and open the Properties Dialog.
Click on a property called IntraHeight and then press F1. Read about it and change it to see if this helps.
Those are the only things I can think of except a Event Macro firing
when you do an On Open of the workbook that was somehow doing something,
but I'd need the code to tell.
hope that helps.
Mike M. replied to Somesh Yadav on 26-Mar-12 10:18 AM
I think I've tried every combo of IntraHeight options and Move & Size options, and none seemed to help. I added code to an Auto_Open macro to set height and width. This seems to help, as it displays the right list box size (although some users still see a scroll bar when one isn't needed). I think this will work, as it is the best option I've seen.
Thanks for your help.