Private Sub CalculateDeductionPer()
Dim FixSumPer As Double
Dim i As Integer
If DataGridView1.Rows(i).Cells(9).Value Is Nothing = True Then
For i = 0 To Me.DataGridView1.RowCount - 1
FixSumPer += DataGridView1.Rows(i).Cells(9).Value
Next
i = i + 1
End If
Deduction.Text = FixSumPer
End Sub
this is my code to sum some cols in data grid but if some of cell = null all total of FixSumPer = 0 , how i can fix this to get all sum
HibaPro -3 Junior Poster
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.