This tutorial is all about How to Reorder List in Listbox using VB.Net. With this tutorial you can Reorder List in Listbox using VB.Net easily. So let’s get started:
- First is open the Visual Basic, Select File on the menu, then click New and create a new project.
- Then a New Project Dialog will appear. You can rename your project, depending on what you like to name it. After that click OK
- Design your form like this just like what I’ve shown you below.
Add a 2 Listbox and a button.
- Add this code to the button.
[vbnet]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer
Dim b As String
Do
a = ListBox1.Items.Count – 1
b = ListBox1.Items(a)
ListBox2.Items.Add(b)
ListBox1.Items.RemoveAt(a)
Loop Until a = 0
End Sub[/vbnet]
- Finally, Click F5 to run program.
Output:
If you have any comments or suggestion about on How to Reorder List in Listbox using VB.Net, Please Feel Free to contact our webpage.
Download How to Reorder List in Listbox using VB.Net Code Here
Other articles you might read also: