even better to use vbNewLine, that works on the Mac too
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"vbapro" <(E-Mail Removed)> wrote in message
news

F834ADE-34B9-4087-A022-(E-Mail Removed)...
> It does, but many high-usage fonts display this square. And the meaning of
> vbLf is "soft" manual line breaking, while vbCrLf means a new paragraph.
>
> "Ben McBen" wrote:
>
>> Dos that depend on font family?
>>
>> "vbapro" wrote:
>>
>> > vbCrLf gives extra unnecessary CR symbol which can be displayed as a
>> > square,
>> > that is why nicer to use vbLf
>> >
>> > "Ben McBen" wrote:
>> >
>> > > Something like:
>> > >
>> > > Public Function ChopAndTrim(strInput As String, intChopLen As
>> > > Integer) As
>> > > String
>> > >
>> > > Dim strArr() As String
>> > > Dim strTmp As String
>> > > Dim strOut As String
>> > > Dim i As Long
>> > >
>> > > strArr = Split(strInput, " ")
>> > > For i = LBound(strArr) To UBound(strArr)
>> > > If Len(strTmp) + Len(strArr(i)) > intChopLen Then
>> > > strOut = strOut & strTmp & vbCrLf
>> > > strTmp = strArr(i) & "_"
>> > > Else
>> > > strTmp = strTmp & strArr(i) & "_"
>> > > End If
>> > > If i = UBound(strArr) Then
>> > > strOut = strOut & strArr(i)
>> > > End If
>> > > Next i
>> > >
>> > > ChopAndTrim = strOut
>> > >
>> > > End Function
>> > >
>> > > You will need to set formatting to wrap text....
>> > >
>> > >
>> > >
>> > > "Excel ESG" wrote:
>> > >
>> > > > Hello,
>> > > >
>> > > > I have a string wich I want to convert.
>> > > > All spaces should be replaced by an underscore,
>> > > > and an (alt-enter) should be inserted after an underscore so that
>> > > > the string
>> > > > is wrapped to a max length of 13 characters
>> > > >
>> > > > e.g "Thanks very much in advance" should result in
>> > > >
>> > > > Thanks_very_(Alt-Enter)
>> > > > much_in_(Alt-Enter)
>> > > > advance
>> > > >
>> > > > Someone told me it should be possible with an UDF,
>> > > > but I have no experience with that
>> > > >
>> > > >