I have created a form with an editbox and what I need to do is to make
the text content wrap rather than continuing on to the right past the
size of the box. Any ideas welcome please.
With DialogSheets("FormAdd")
.EditBoxes("Edit Box 144").Text = ""
.Show
End With

Text wraping on edit box of dialogsheet
TerriM
Ray Fernandez379013
rabbitoh,
What software you developing in
DialogSheet and EditBoxes sound like older versions of forms and text boxes, this might explain the 256 character limit.
AlexPil
Hi,
Check if the EditBox has a WordWrap property, if it does set it to true. If it doesn't then it might have something equivalent, like maybe a Wrap property, if it doesn't then it won't be possible unless you implement the wrapping logic yourself.
.EditBoxes("Edit Box 144").WordWrap = True
KentaroM
The line of code doesn't work on its own either even in the absence of the .text line.
The MaiN MaN
T
WillTurner
As Derek mentioned in his answer. Set WordWrap to true.
Also set MultiLine to True, but this will only work if the height of the textbox is sufficient to accomodate the lines of text.
In the example blow the textbox width was 72.
This should get you on your way.
Private Sub TextBox1_Change()
origHeight = 15
textlen = Int(Len(TextBox1.Text) / 15) + 1
TextBox1.Height = origHeight * textlen
End Sub
You'll have to play around with the figures but it will produce what you need.
ChasAA
Morten Dahl