View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Neil Miller[_3_] Neil Miller[_3_] is offline
external usenet poster
 
Posts: 3
Default CRLF in text box


Thanks for your prompt response, but it's still not working for me. I
tried the following workaround:

Dim mY_stR As String
With UserForm1
If Trim(.TextBox1.Text) < "" Then
mY_stR = Trim(.TextBox1.Text)
.TextBox1.Text = ""
Do While Right(mY_stR, 2) = vbCrLf
mY_stR = Left(mY_stR, Len(mY_stR) - 2)
Loop
.TextBox1.Text = "" = mY_stR
End If
End With

When the contents of mY_stR are stored back into the textbox, then the
VBA watch for that field, and the textbox on the displayed form, both
show "False".

In the test you tried, is MultiLine set to True? I can get round the
problem if this is set to False, but that really defeats the object.

Many thanks.......Neil


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!