Can I merge (cells) and align center (vertical and horizontal) headings in MSFlexGrid?

Could anybody show me how to merge several cells and align center headings horizontally or vertically in MSFlexGrid?

thanks,

sabas
sabasAsked:
Who is Participating?
 
TimCotteeHead of Software ServicesCommented:
Hi sabas,

This shows how to achieve this in a very simple way, you just need a flexgrid with a few rows and columns:

Private Sub Form_Load()
    With MSFlexGrid1
        .MergeCells = flexMergeFree
        .FormatString = "|^Header 1|^Header 2|^Header 3|^Header 3|Header 4|^Header 5|^Header 6|^Header 7|^Header 8|^Header 9"
        .TextMatrix(1, 1) = "Hello"
        .TextMatrix(2, 1) = "Hello"
        .TextMatrix(1, 3) = "Goodbye"
        .TextMatrix(1, 4) = "Goodbye"
        .MergeCol(1) = True
        .MergeRow(1) = True
        .MergeRow(0) = True
    End With
End Sub

Tim Cottee
0
 
sabasAuthor Commented:
thanks, Tim Cottee
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.