The only thing I can see right away is in your function header:
Private Function TotalColumn(Grid As MSFlexGrid, etc...)
'Change to:
Private Function TotalColumn(Grid AS MSHFlexGrid, etc...)
Also, when you call the function, i.e. "Text1.Text = TotalColumn(FlexGrid, 15)", make sure that 'FlexGrid' is the name of your grid.
At any rate, a ByRef argument type mismatch error is blaming the grid part of the function call, but the rest looks ok...try checking these and see what happens.
~Mike
Any man willing to sacrifice liberty for security deserves neither liberty nor security.
-Ben Franklin