I want to fill a MSFlexiGridCell with more than one line of text. Ho can I do this?
Printable View
I want to fill a MSFlexiGridCell with more than one line of text. Ho can I do this?
Do you mean two lines separated with <Enter> ?
Try this:
String1 = String2 & vbKeyEnter (or vbKeyReturn, I don't remember...) & String3
Grid.Cell... = String1
The imp. thing is you put the newline character inside the string and then display it into the grid.
Does it work?
You have to make sure that WordWrap is set to True for the MSFlexGrid and then populate the grid. If you want to control where the line breaks occur in the text, use the vbCrLf where necessary.
Hope this helps.Code:strTemp = "This is Line 1." & vbCrLf & "This is Line 2."