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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

Multiple text lines with a MSFlexgrid cell

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
lennyh
Asked:
lennyh
1 Solution
 
Erick37Commented:
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
 
pauljkCommented:
You can also use chr(13) in place of vbCrLf
0
 
VbmasterCommented:
Just a little note...

vbCr = Chr(13)
vbLf = Chr(10)
vbCrLf = Chr(13) + Chr(10)
0
 
lennyhAuthor Commented:
Thanks to all for your clear responses and helpful information.

Lenny
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now