View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
david mcritchie david mcritchie is offline
external usenet poster
 
Posts: 691
Default Strip chr(13) from Comments

Just in case they are Chr(10) perhaps this would be better.
ActiveSheet.Cells(i, x).AddComment _
application.TRIM(replace(replace(olTsk.Body,chr(13 )," "),chr(10)," "))

But you definitely don't want to use CLEAN which will remove
characters and not put a space in it's place. More on CLEAN in
http://www.mvps.org/dmcritchie/excel/join.htm#trimall
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm