Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged Dim sel As IList = ListBox1.SelectedItems TextBox1.Text = CStr(Aggregate p In If(sel.Count = 0, ListBox1.Items, sel) Into Sum(CDbl(p))) End Sub