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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Programatically Selecting all values in listbox

Status
Not open for further replies.

pcdaveh

Technical User
Sep 26, 2000
213
US
Is there a way to Programatically select all values in a list box? I have a list box that when I run a report I want it to select all the values every item in the list box and then dump those values into a table. I have the code to get it into the table. I just need to know how to select all the values.
 
Hi!

Try this:

Dim lngRowCount As Long

For lngRowCount = 0 To YourListBox.ItemCount - 1
YourListBox(lngRowCount).Selected = True
Next lngRowCount

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top