Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2005-05-16
Medium Priority
Last Modified: 2013-12-25
Could anybody show me how to merge several cells and align center headings horizontally or vertically in MSFlexGrid?


Question by:sabas
LVL 43

Accepted Solution

TimCottee earned 200 total points
ID: 14011072
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

Author Comment

ID: 14017327
thanks, Tim Cottee

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question