By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,988 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,988 IT Pros & Developers. It's quick & easy.

List box value

P: 89
Hi all, I have a problem with Listbox. how to get value from list box if list box is multiple selected. such as:

Listbox1.addItem "X"
Listbox1.addItem "Y"
Listbox1.addItem "Z"
Listbox1.addItem "P"
Listbox1.addItem "Q"

Now, i want to see values if i select X and Y items after pressing button1, i am using vb6. so, what is the process to get multiple output from listbox? Thx advance.
Dec 27 '07 #1
Share this Question
Share on Google+
1 Reply


9815402440
100+
P: 180
hi

use following code

dim i as integer
for i = 0 to list1.listcount-1
if list1.selected(i) = true then
debug.print i & " is selected"
endif
next

regards
manpreet singh dhillon hoshiarpur
Dec 27 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.