Dim sum As Integer = 0 For Each Str As String In ListBox1.Items sum = sum + CInt(Str) Next TextBox1.Text = sum
TextBox2.Text = ListBox1.Items.Count