Dim thewidth As Long
i = 0
thewidth = 0
ScrollWidth = 280
For i = 0 To .Cols - 1
thewidth = thewidth + .ColWidth(i)
Next
If thewidth <> .Width - ScrollWidth Then
.ColWidth(4) = .ColWidth(4) + (.Width - ScrollWidth - thewidth) - 20
End If
' set grid's style
.AllowBigSelection = True
.FillStyle = flexFillRepeat
.GridColor = &HC0C0C0
' make header bold
.Row = 0
.Col = 0
.RowSel = .FixedRows - 1
.ColSel = .Cols - 1
.CellFontBold = True
If ii < 33 Then
ii = 33
End If
If .Rows < ii Then
Do While .Rows < ii
.AddItem ""
Loop
Else
Do While .Rows > ii
.RemoveItem .Rows - 1
Loop
End If
i = 0
For i = .FixedRows To .Rows - 1 Step 1
.Col = 0
.Row = i
.Text = i
Next i
i = 0
For i = .FixedRows + 1 To .Rows - 1 Step 2
.Row = i
.Col = .FixedCols
.ColSel = .Cols() - .FixedCols
.CellBackColor = &HCCFFCC '&HC0C0C0 ' light grey
Next i
.Row = 1
.ColSel = .Cols() - .FixedCols
.AllowBigSelection = True
.FillStyle = flexFillSingle
.HighLight = flexHighlightAlways
.Redraw = True
.Refresh
End With
End Function