Private Sub Form_Load()
Dim i As Integer, j As Integer
With MSFlexGrid1
.Rows = 5
.Cols = 5
For i = 0 To 4
For j = 0 To 4
.Row = i
.Col = j
.CellBackColor = Choose((i * 5 + j) Mod 3 + 1, vbRed, vbBlue, vbBlack)
.Text = Chr(i * 5 + j + 65)
.ForeColor = Choose((i * 5 + j) Mod 3 + 1, vbBlack, vbRed, vbBwhite)
Next
Next
End With
End Sub