Subtotal     fg.ColFormat(3) = "$(#,###.00)" ' set format for calculated totals
    fg.Subtotal flexSTClear         ' remove old values    ' calculate subtotals (the order doesn't matter)
    ' (sales values to be added are in column 3)
    ' col 0: product
    fg.Subtotal flexSTSum, 0, 3, , vbRed  ,,," TotPrd %s",,True   
    ' col 1: employee
    fg.Subtotal flexSTSum, 1, 3, , vbGreen,,,"  TotEmp %s",,True  
    ' col 2: region
    fg.Subtotal flexSTSum, 2, 3, , vbBlue ,,,"   TotRgn %s",,True     ' total on a negative column to get a grand total
    fg.Subtotal flexSTSum, -1, 3, , vbblue, vbwhite, true
Help中有帮助的