Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks to both who replied. I have already made the changes in the
ColumnWidth property. I hadn't realized that you could set a property on a combo box to prevent a user from typing in a value, so I will work with that also. Dave Ramage wrote: Hank, This is indeed strange behaviour, but seems to be fixed by setting the ColumnWidth property to something small (e.g. 2). It does sound like you really want a combobox though, which would only show the selected value in a single row, or the complete/partial list if the user clicks the expand arrow. Set the combo box parameter "Style" to fmStyleDropDownList if you don't want the user to be able to type in values that aren't in the list. Cheers, Dave "Hank Youngerman" wrote: I have a UserForm with two listboxes on it. Each listbox is populated with about 4-8 numbers of 2 or 3 digits. Each listbox is wide enough for about 4 numbers, and high enough for two rows. When I load the form, the boxes appear with both horizontal and vertical scroll bars, and I can see two numbers in the boxes, one on top of the other. The two-digit numbers appear fine, but the three-digit numbers are aligned such that the right-most number is partially cut off. For both boxes, the TextAlign property is set to fmTextAlignLeft. If I change the TextAlign property (to center or right) the contents disappear, and I have to scroll to the right to see it. I populate the boxes with the additem method, specifically: UserForm1.Radius.AddItem 8 UserForm1.Radius.AddItem 10 UserForm1.Radius.AddItem 100 What appears to be happening is that the control interprets these as being about 8-10 characters wide. If I widen the listboxes, the scroll bars go away. But none of the values are greater than 3 digits. So my first question is, how do I get the listboxes to recognize that these are just 3-digit numbers, and get it to accomodate a narrow listbox without scroll bars? With regard to vertical appearance, I want it to be something like a dropdown box. What I have now is more like a text window with vertical scroll bars. Am I just using the wrong kind of control for this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need help with Listboxes! | Excel Programming | |||
listboxes | Excel Programming | |||
listboxes | Excel Programming | |||
listboxes | Excel Programming | |||
Listboxes | Excel Programming |