Solved

Multiple text lines with a MSFlexgrid cell

Posted on 2000-05-07
4
285 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 50 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

772 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