显示完数据后,建立一个FOR语句,遇有奇数的是一种颜色,遇有偶数的是另一种颜色。

解决方案 »

  1.   

    显示完数据后,检查mflexgrid.TEXT内容,如有满足你需要的定义该格为红色...
      

  2.   

    Option Explicit'    Purpose:
    '     Author:吴文智
    '       Date:2001-1
    'Description:要试用本例请在窗体中填加 一个MSFlexGrid
    '            然后在代码窗体中粘贴如下代码
    '            Good luck!Private Sub Form_Load()
        Dim lngRow As Long
        Dim lngCol As Long
        Dim lngColor As Long
        
        With MSFlexGrid1
            .Rows = 10
        
            For lngRow = .FixedRows To .Rows - 1
                If (lngRow Mod 2) = 0 Then
                    lngColor = vbRed
                Else
                    lngColor = vbBlue
                End If
                .Row = lngRow
                For lngCol = .FixedCols To .Cols - 1
                    .Col = lngCol
                    .CellBackColor = lngColor
                Next
            Next
        End With
    End Sub
      

  3.   

    smartgkk(Mr.Kwok)怎么定义色彩!