Private Function Total() As Double
   Dim tot As Double = 0
   Dim i As Integer = 0  
   
   For i = 0 To PaymentsDataGridView.Rows.Count - 1
       tot = tot +   Convert.ToDouble(PaymentsDataGridView.Rows(i).Cells("Amount").Value) 
      Next i   
      Return tot
      End Function
this is the code you gave me about my post but why i cant reply to my post lol..thats why i create a new topic :D
can you also pls provide me the code using vb6?..
      
    