同样的方法也适用于将货币列格式化,下面是代码片段:
Dim i As Integer
Dim n As Integer
For i = 1 To Adodc1.Recordset.RecordCount
For n = 5 To 9
MSHFlexGrid1.TextMatrix(i, 2) = Format(MSHFlexGrid1.TextMatrix(i, 2), "yyyy-mm-dd")
MSHFlexGrid1.TextMatrix(i, n) = Format(MSHFlexGrid1.TextMatrix(i, n), "¥0.00")
Next n
Next i