ne pas faire apparaître le caractère saut de ligne
"Nathalie" wrote in message
om...
je voudrai respecter dans ma celluls le retour à la ligne tel que tapé
dans ma textbox mais ne pas faire apparaître car le texte est destiné
à être imprimé.
Nathalie,
(Excusez mon français...)
Il faut substituer vbLf [Chr(10)] pour vbNewLine [Chr(13) + Chr(10)] comme
cela:
Dim strText As String
strText = txtTest.Value
strText = Application.WorksheetFunction.Substitute(strText, vbNewLine,
vbLf)
ou, simplement, remplacer vbLf avec "":
Dim strText As String
strText = txtTest.Value
strText = Application.WorksheetFunction.Substitute(strText, vbCr, "")
--
Dianne
|