Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Select All" for values in a list box.

Status
Not open for further replies.

storm75m

Programmer
Apr 18, 2001
81
0
0
US
Pretty straight forward question... I have a list box on my form and I would like to create a button that selects all of the values in the list box. Is there a simple way to do this? TIA...
 
there's a thing called ItemIndex which is just a generated index of all items in a listbox

you can use that with ItemCount to select all the items...

--------------------
Procrastinate Now!
 
[tt]dim idx as long
for idx=0 to me!lstMylist.listcount-1
me!lstMylist.selected(idx)=true
next idx[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top