LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Appearance of listboxes

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Listboxes! Angelus[_2_] Excel Programming 4 January 24th 06 04:50 AM
listboxes [email protected] Excel Programming 2 March 30th 05 06:41 PM
listboxes [email protected] Excel Programming 3 February 22nd 05 04:01 PM
listboxes [email protected] Excel Programming 2 February 22nd 05 10:31 AM
Listboxes Lionel Fridjhon Excel Programming 0 April 5th 04 06:28 PM


All times are GMT +1. The time now is 07:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"