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 / May 2006

Tip: Looking for answers? Try searching our database.

Multiple List Boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joanne - 11 May 2006 20:40 GMT
Hello,
I have three list boxes.  The first one has a list of colleges, the second a
list of degrees and the third a list of honors like cum laude etc.  I am
trying to use a For Loop to discover whether or not an entry in the college
list box has been selected and then, if it has, to take the information from
the degree list and the honors list.  Each list has a different number of
entries and I'm not quite sure how to approach this.  Thank you in advance
for any help you can provide.
Jonathan West - 12 May 2006 10:59 GMT
> Hello,
> I have three list boxes.  The first one has a list of colleges, the second
[quoted text clipped - 7 lines]
> entries and I'm not quite sure how to approach this.  Thank you in advance
> for any help you can provide.

Hi Joanne,

If you are only permitting a single college to be selected (i.e. the
AllowMultiSelect property of the listbox is False), then if no selection has
been made, the ListIndex property of that listbox is -1. If a selection has
been made, the Listindex property is in the range 0 to number of items - 1.

If you are permitting multiple selections in the listbox (i.e.
AllowMultiSelect is True), then you need to check the Selected property of
every item in the listbox. if one or more items is True, then you have at
least ine selection.

There are code examples for these properties in the VBA help.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 

 
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.