Solved

Multiple text lines with a MSFlexgrid cell

Posted on 2000-05-07
4
291 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

632 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