MSFLEXGRID OR MSHFLEXGRID就有你需要的功能:
Private Sub Command1_Click()
With MSFlexGrid1
For i = 1 To .Rows - 1 Step 2
.Row = i
.Col = 1
.CellBackColor = vbRed
.Col = 3
.CellForeColor = vbBlue
Next
End With
End Sub
Private Sub Form_Load()
Dim i As Long, j As Long
With MSFlexGrid1
.Rows = 100
.Cols = 5
.FixedRows = 1
.FixedCols = 0
For i = 0 To 99
For j = 0 To 4
.TextMatrix(i, j) = IIf(i = 0, "第" & j & "行", i * j)
Next
Next
End With
End Sub