0

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

3
Contributors
5
Replies
26
Views
4 Years
Discussion Span
Last Post by Sunil_11
1

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 by Jx_Man

Votes + Comments
0

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

0

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

0

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.