Dim sum As Double = 0.0
For i As Integer = 0 To DataGridView1.RowCount - 1
OldValue = Double.Parse(DataGridView1(7, i).Value.ToString())
If DataGridView1.Rows(i).Selected = True Then
DataGridView1.Rows.RemoveAt(i)
End If
Next
sum = sum - OldValue
txtTotal.Text = sum.ToString("#,###.00")
Tag : .NET, VB.NET, VS 2005 (.NET 2.x), VS 2008 (.NET 3.x), VS 2010 (.NET 4.x), VS 2012 (.NET 4.x)