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

Listbox

Status
Not open for further replies.

Kendel

Programmer
Apr 24, 2002
1,512
US
Hello all,

Can you show me how to loop thru the length of a listbox to select all items? (In VBScript please)

Thanks.
 
Nervermind I found the answer. Thank you room.
 
Kendel, thanks for sharing.
Can you close this thread with the answer you've found ?
 
Here is how I select all items in a listbox:

For i=0 to document.form1.list1.length -1
document.form1.list1.options(i).selected = true
Next

 
Actually you can try this to:
dim opt
for each opt in document.formname.comboboxname.options
opt.selected = true
next
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top