Professional Documents
Culture Documents
Sunil Prac 4
Sunil Prac 4
Aim: Write a program in VB that transfers selected items from listbox 1 to listbox2
and viceversa
Theory/Logic: The items are added in listbox during designtime.Two command buttons are
used to transfer selected items forom one to onother listbox.The selected item is transferred form
left to right on clicking >> butoon.The reverse procedure is done through << button.If nothing is
selected and any button is pressed then usedefined error is dispayed to select item.
The controls which are used in project are listed below with respective properties.
Else
List2.AddItem List1.List(List1.ListIndex)
List1.RemoveItem List1.ListIndex
End If
End Sub
Else
List1.AddItem List2.List(List2.ListIndex)
List2.RemoveItem List2.ListIndex
End If
End Sub
Output: