想用 MSFlexGrid控件将前2列和前2行 固定作为标题,并且想合并第1\2列的1、2行 ,不行帮忙修改一下。。
想用 MSFlexGrid控件将前2列和前2行 固定作为标题,并且想合并第1\2列的1、2行 ,不行帮忙修改一下。。Public Sub qbtitle(MSF1 As MSFlexGrid, scrq As String, bu) '预览生产单gongdan窗体时用到
Dim i As Integer
Dim Y() As String
MSF1.Clear
With MSF1
.Cols = UBound(bu) * 4 + 3
.Rows = 53
.FixedCols = 2 '
.FixedRows = 2 '
.MergeCells = flexMergeRestrictAll '单元格可以合并
' MergeCells = flexMergeFree '单元格可以合并
.RowHeightMin = 380
.MergeCol(0) = True ' 列允许相同的合并
.MergeCol(1) = True ' 列允许相同的合并
' MSFlexGrid1.MergeCol(2) = True
.MergeRow(0) = True ' 行允许相同的合并
.TextMatrix(0, 0) = "日 期↓ " 没有合并起来
.TextMatrix(1, 0) = "日 期↓ "
.TextMatrix(0, 1) = "生产单号↓" 没有合并起来
.TextMatrix(1, 1) = "生产单号↓"
.TextMatrix(0, 2) = "白 " 这5个白字合并了
.TextMatrix(0, 3) = "白 "
.TextMatrix(0, 4) = "白 "
.TextMatrix(0, 5) = "白 "
.TextMatrix(1, 2) = "当日数"
.TextMatrix(1, 3) = "优级"
.FixedRows = 1
For i = 0 To UBound(bu) + 1
.CellFontBold = True
.ColAlignment(i) = 4 '3
Next i
.FillStyle = flexFillSingle
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
'.CellAlignment = 0
End With
End Sub