sir in visual basic 6.0 i have made an application which contains the listbox .The multiselect property of the listbox is set as the simple select.I have a button on it to remove the selected items .The coding of this button is following
dim i as integer
if list1.selcount=1 then
list1.removeitem i
else if list1.selcount>1 then
for i=0 to list1.listcount-1
if list1.selected(i) then
list1.removeitem i
end if
next
end if
but this code generates an error and when i scan the lisbox backward (for i=list1.listcount-1 to 0 step -1) then it does not generates an error.why explain it.please help.
2007-05-24
02:12:46
·
1 answers
·
asked by
Zia ur Rahman
1
in
Computers & Internet
➔ Programming & Design