如何设定MSHFlexgrid中包含 0 的单元格的背景颜色
如何设定MSHFlexgrid中包含 0 的单元格的背景颜色也就是说 MSHFlexgrid中凡是含有 0 的 背景颜色都改变。
需要代码。
谢谢。
Private Sub Command1_Click() For i = 0 To List1.ListCount - 2 a = Left(Right(List1.List(i), 3), 1) c = Right(Right(List1.List(i), 3), 1) d = Right(Val(a) + Val(c), 1) MSFlexGrid1.TextMatrix(i + 2, 2) = d & " " MSFlexGrid1.TextMatrix(i + 2, 3) = Right(a + 2, 1) & " " If Right(a + 2, 1) = d Then MSFlexGrid1.TextMatrix(i + 2, 4) = "" Else MSFlexGrid1.TextMatrix(i + 2, 4) = " √" End If Next End Sub Private Sub Form_Load() MSFlexGrid1.Rows = 22 MSFlexGrid1.Cols = 5 For i = 2011001 To 2011020 List1.AddItem i Next End Sub