Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Multiple text lines with a MSFlexgrid cell

Posted on 2000-05-07
4
Medium Priority
?
293 Views
Last Modified: 2012-06-27
I'm looking for a simple way to cause information within cells of an MSFlexGrid to appear on two separate lines?  I'm not talking about word wrap here.  Rather, I wish the displayed  data to be separated at a specific place within the text -- somewhat like one would expect to get with a CRLF.
0
Comment
Question by:lennyh
4 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 200 total points
ID: 2786829
Private Sub Command1_Click()
    With MSFlexGrid1
    .WordWrap = True
    .RowHeight(1) = TextHeight("()") * 3.5 '3 lines
    .Row = 1
    .Col = 1
    .Text = "Line1" & vbCrLf & "Line2" & vbCrLf & "Line3"
    End With
End Sub
0
 
LVL 1

Expert Comment

by:pauljk
ID: 2786870
You can also use chr(13) in place of vbCrLf
0
 
LVL 7

Expert Comment

by:Vbmaster
ID: 2786899
Just a little note...

vbCr = Chr(13)
vbLf = Chr(10)
vbCrLf = Chr(13) + Chr(10)
0
 

Author Comment

by:lennyh
ID: 2788048
Thanks to all for your clear responses and helpful information.

Lenny
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

886 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