hi thanks a lot for answering me back....
well i still have some doubts with previous solution
private sub command1_click( )
for n=0 tolist1.listcou nt-1
if list1.selected( n) =true then
list2.additem list1.list(n)
list1.selected( n)=false
end if
next n
end sub
ok i got the point about the incrementation of next n=n+1.but i want to know that
if n=0 means first index value of my list item and listcount means end value of my list item let it be 7 i.e, 6 by (list1.listcoun t-1)
well what does list1.selected( n)=true means here.... is it saying that the index value between 0 to 6 is correct, or a condition which checks that i have selected the index value between 0 to 6....please make me clear
as well i want to know if i select the items from list 1 having index value between 0 to 6 let it be index 3 and send it to list2.... then next n takes me to index 4 then index 5 then index 6(who does not respond and display any item name or send its value to list 2 because i have not selected those items)??? and if my loop condition ends the program ends and in the code as said (list1.selected (n)=false) makes my selected item false in list 1.
so what happens if i select the same item next time how does for loop react does it makes again the value of n=0 and start from the begining?will there be any flow of previous loop in next selection....?? ?
is this the concept here of for loop...please explain me....
thanks looking forward...at(nv nrai8@gmail.com )
well i still have some doubts with previous solution
private sub command1_click( )
for n=0 tolist1.listcou nt-1
if list1.selected( n) =true then
list2.additem list1.list(n)
list1.selected( n)=false
end if
next n
end sub
ok i got the point about the incrementation of next n=n+1.but i want to know that
if n=0 means first index value of my list item and listcount means end value of my list item let it be 7 i.e, 6 by (list1.listcoun t-1)
well what does list1.selected( n)=true means here.... is it saying that the index value between 0 to 6 is correct, or a condition which checks that i have selected the index value between 0 to 6....please make me clear
as well i want to know if i select the items from list 1 having index value between 0 to 6 let it be index 3 and send it to list2.... then next n takes me to index 4 then index 5 then index 6(who does not respond and display any item name or send its value to list 2 because i have not selected those items)??? and if my loop condition ends the program ends and in the code as said (list1.selected (n)=false) makes my selected item false in list 1.
so what happens if i select the same item next time how does for loop react does it makes again the value of n=0 and start from the begining?will there be any flow of previous loop in next selection....?? ?
is this the concept here of for loop...please explain me....
thanks looking forward...at(nv nrai8@gmail.com )
Comment