Vertical scrollbar on combobox list?

  • Thread starter christophercbrewster via OfficeKB.com
  • Start date
C

christophercbrewster via OfficeKB.com

I created a user form containing a pulldown selection list in a combobox.
(Thanks to Jay Friedman and Doug Wellman, and a co-worker.) The list behaves
just right, except that it needs a scrollbar. Scrollbars are so common that I
thought it would be easy to get, or even that I wouldn't need to specify it--
it would just appear if the list was too long for the available space. But
the discussions I've found look really involved, to the point where I don't
even see how they directly relate to just "add a scrollbar when it's needed".
Is there a way to code this, of maybe less-than-staggering complexity?
 
J

Jay Freedman

christophercbrewster said:
I created a user form containing a pulldown selection list in a
combobox. (Thanks to Jay Friedman and Doug Wellman, and a co-worker.)
The list behaves just right, except that it needs a scrollbar.
Scrollbars are so common that I thought it would be easy to get, or
even that I wouldn't need to specify it-- it would just appear if the
list was too long for the available space. But the discussions I've
found look really involved, to the point where I don't even see how
they directly relate to just "add a scrollbar when it's needed". Is
there a way to code this, of maybe less-than-staggering complexity?

Both a combo box on a userform and one in the document (from the Control
Toolbox) behave for me as you expected, showing a scrollbar when the length
of the list exceeds the visible dropdown. I wouldn't know how to get rid of
it...

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

christophercbrewster via OfficeKB.com

That's both good and bad news. I'm glad to know it *should* be there, but can
you suggest why it isn't? As a test, I loaded a long list to see the box's
built-in limit, and it's around 80 items. But I can't access items beyond
that. I think I added the combobox in the standard way, and have added almost
no code to it-- just an initial window value and setting the variable to be
returned.

Jay said:
I created a user form containing a pulldown selection list in a
combobox. (Thanks to Jay Friedman and Doug Wellman, and a co-worker.)
[quoted text clipped - 5 lines]
they directly relate to just "add a scrollbar when it's needed". Is
there a way to code this, of maybe less-than-staggering complexity?

Both a combo box on a userform and one in the document (from the Control
Toolbox) behave for me as you expected, showing a scrollbar when the length
of the list exceeds the visible dropdown. I wouldn't know how to get rid of
it...

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200810/1
 
J

Jay Freedman

As I said, I wouldn't know how to suppress the scroll bar if that task was
assigned to me (although I probably do know who to ask...).

If you care to email the offending document to me, I'll have a look. If you
don't see my address in this message, it's on my page at
http://jay-freedman.info.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
That's both good and bad news. I'm glad to know it *should* be there,
but can you suggest why it isn't? As a test, I loaded a long list to
see the box's built-in limit, and it's around 80 items. But I can't
access items beyond that. I think I added the combobox in the
standard way, and have added almost no code to it-- just an initial
window value and setting the variable to be returned.

Jay said:
I created a user form containing a pulldown selection list in a
combobox. (Thanks to Jay Friedman and Doug Wellman, and a
co-worker.)
[quoted text clipped - 5 lines]
they directly relate to just "add a scrollbar when it's needed". Is
there a way to code this, of maybe less-than-staggering complexity?

Both a combo box on a userform and one in the document (from the
Control Toolbox) behave for me as you expected, showing a scrollbar
when the length of the list exceeds the visible dropdown. I wouldn't
know how to get rid of it...
 
C

christophercbrewster via OfficeKB.com

I found the answer. I'm at a different computer now, but I think the property
is MaxRows or something like that. The initial or default value was
apparently 0, which results in no scrollbar. I set it at 30, and now it's
right.

Jay said:
As I said, I wouldn't know how to suppress the scroll bar if that task was
assigned to me (although I probably do know who to ask...).

If you care to email the offending document to me, I'll have a look. If you
don't see my address in this message, it's on my page at
http://jay-freedman.info.
That's both good and bad news. I'm glad to know it *should* be there,
but can you suggest why it isn't? As a test, I loaded a long list to
[quoted text clipped - 14 lines]

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200810/1
 

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