Private Sub Command1_Click()
Dim intRow As Integer
Dim intTotal As Integer
intTotal = 0
With MSFlexGrid1
For intRow = 0 To .Rows - 2
intTotal = intTotal + Val(.TextMatrix(intRow, 1))
Next intRow
.TextMatrix(3, 1) = CStr(intTotal)
End With 'MSFlexGrid1
End Sub
Private Sub Form_Load()
With MSFlexGrid1
.TextMatrix(0, 0) = "001"
.TextMatrix(1, 0) = "003"
.TextMatrix(2, 0) = "002"
.TextMatrix(0, 1) = "200"
.TextMatrix(1, 1) = "400"
.TextMatrix(2, 1) = "600"
.TextMatrix(3, 0) = "Total"
End With 'MSFlexGrid1
End Sub