hi
i have msflexgrid with 4 columns; date, Name, Agent and Amount. Am looking for help on how i can show totals on the amount column to show below the last figure on the amount column..

i will appreciate any suggestion or help

thanx

Make sure you have one more row for sum of amount

Try :

    Dim temp As Integer
    temp = 0

    For i = 1 To MSFlexGrid1.Rows - 1
        temp = temp + Val(MSFlexGrid1.TextMatrix(i, 4))
    Next i

    'set sum of amount to last row
    MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows - 1, 4) = temp

af5176f21877f429286df1edb1c3361b

Edited 3 Years Ago by Jx_Man

Comments

hi Jx Man,
thannx a lot for your quick response...but wat do u mean have an extra row.

thanx a lot i dint know how to add the row but i figured it out.

how to make a common Function That Will take a MSFlexGrid Name and Return sum of all Colomn having data Type Integer Or Double

This question has already been answered. Start a new discussion instead.