Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Displaying list box on UserForm

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nam - 03 Oct 2005 18:17 GMT
How can I display a LisBox on a UserForm that has its boundaries extending
outside the boundaries of the UserForm? I am using MS Word 2000.

The LisBox is at the bottom of the UserForm. When a user clicks on the
ListBox, I want the ListBox to display like a Popup menu with its list of
items crossing over the bottom boundary of the UserForm.

I don't want to increase the height of the UserFrom. Keep in mind that the
Parent property of a UserForm control in VBA is Read-Only.

Thanks,
Nam
Jay Freedman - 03 Oct 2005 18:54 GMT
> How can I display a LisBox on a UserForm that has its boundaries
> extending outside the boundaries of the UserForm? I am using MS Word
[quoted text clipped - 9 lines]
> Thanks,
> Nam

You can't do this at all with a ListBox. Use a ComboBox control instead. A
ComboBox behaves this way without any additional programming -- if the list
is longer than the depth of the UserForm below it, the list just extends
past the edge of the UserForm.

If you want the ComboBox to prevent the user from typing anything in the
edit area that doesn't already exist in the list, set the box's
.MatchRequired property to True. Then it will behave just like a ListBox for
purposes of selecting from a fixed list, but it will also have the popup
behavior.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.