Solved

Text in top row of FlexGrid?

Posted on 2002-03-18
4
256 Views
Last Modified: 2009-07-29
How do you put text in the top rows of a MSFlexGrid? I can put stuff in all the grids, but not the top row. I am using VB6.
0
Comment
Question by:vmaxx
4 Comments
 
LVL 49

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 6876358
What do you mean by Not the Top Row?

MSFlexGrid1.TextMatrix(0, 1) = "Hello World!" ?

0
 
LVL 18

Expert Comment

by:mdougan
ID: 6876791
There are two ways of putting text in the top row of the flexgrid.  First, is using TextTatrix with a row index of zero like ryancys has suggested.  You can also use the FormatString property:

tblCustomers.FormatString = "CustNo|Cust Name|Balance"

You'd have to look at the colseparators (?) property.  I think that the pipe symbol separates the columns, but it could be a vbTab character.  You can also include special characters that tell the grid whether to right-align, center or left-align the column:

tblCustomers.FormatString = "^CustNo|<Cust Name|>Balance"
0
 
LVL 1

Expert Comment

by:Barraza
ID: 6878885
I had the same problem.  This is how I added the first row and then removed the top "blank" row.

FlexGrid1.AddItem "Column1" & vbTab & "Column2" & vbTab & "Column3"

If FlexGrid1.TextMatrix(1, 1) = "" Then FlexGrid1.RemoveItem (1)


0
 
LVL 1

Author Comment

by:vmaxx
ID: 6879265
Thats it, I can't tell you how long I went through the help files looking for that simple command.

thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use Multiple Forms 4 49
VBA open file from excel cell 4 36
Hide vba in gp 7 83
VB6 ListBox Question 4 33
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now