I am trying to create a program that would allow me to put a paragraph in a textbox, get each letter, and output the letter and number of occurrences of each letter in a listbox. Any help would be greatly appreciated!

maybe that helps:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
		TextBox1.Text = "abcaba"
		Dim dic As New Dictionary(Of Char, Integer)
		For Each c As Char In TextBox1.Text
			If dic.ContainsKey(c) Then
				dic(c) += 1
			Else
				dic.Add(c, 1)
			End If
		Next

		For Each d As KeyValuePair(Of Char, Integer) In dic
			Debug.WriteLine(String.Format("{0} found {1} times.", d.Key, d.Value))
		Next

		'Output:
		'a found 3 times.
		'b found 2 times.
		'c found 1 times.

	End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.