int n = 0, i;
foreach (var item in listBox1.SelectedItems)
{
bool result = Int32.TryParse(item, out i);
if(result)
{
n += i;
}
}
txtBox.Text = n + "";
Not tested, but should work :)
Update - VB .net code
Dim n As Integer = 0, i As Integer
For Each item As var In listBox1.SelectedItems
Dim result As Boolean = Int32.TryParse(item, i)
If result Then
n += i
End If
Next
txtBox.Text = n + ""
-KR