Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27350

VS 2010 ListBox - Remove Duplicates, Alphabetize, Reverse Order

$
0
0
Populate lstOriginal with the given list of items:
In lstDupes, remove all duplicates contained in lstOriginal
In lstAlphabetized, arrange all items in the alphabetical order
In lstReverse, reverse the alphabetical order of the items

Requirements:
You MUST have 5 SubProcedures:
btnOrganize (Event Procedure) - the only action btnOrganize performs is declare variables and call other Subs. Note: if the button is clicked multiple times, lstDupes, lstAlphabetized, lstReverse do NOT change.
GetData (General Sub)
RemoveDupes (General Sub) - Use For Next loop
Alphabetize (General Sub) - Use For Next loop
Reverse (General Sub) - Use For Next loop

This is what's contained in the original ListBox. There's four total (for original, remove duplicates, alphabetize, reverse order)
Michigan
Washington State
Oregon
Mare Island
Great Lakes
Harvard
California
California
USC
Washington
Notre Dame
Alabama
Stanford
Stanford
Georgia Tech
USC
Alabama
USC
USC
Columbia
Alabama
Pittsburgh
California
USC
USC
Stanford
Oregon State
Georgia
USC
USC
Alabama
Illinois
Michigan
Northwestern
Ohio State
Michigan
Illinois
USC
Michigan State
Ohio State
Michigan State
Iowa
Ohio State
Iowa
Washington
Washington
Minnesota
USC
Illinois
Michigan
UCLA
Purdue
USC
Ohio State
USC
Stanford
Stanford
USC
Ohio State
USC
UCLA
USC
Washington
USC
USC
Michigan
Washington
UCLA
UCLA
USC
UCLA
Arizona State
Michigan State
Michigan
USC
Washington
Washington
Michigan
Wisconsin
Penn State
USC
Ohio State
Michigan
Wisconsin
Wisconsin
Washington
Miami
Oklahoma
USC
Texas
Texas
USC
USC
USC
Ohio State

Viewing all articles
Browse latest Browse all 27350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>