View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Klaus[_4_] Klaus[_4_] is offline
external usenet poster
 
Posts: 6
Default force a line break in a comment

At the point you want to insert a line break you have to
insert Chr(10)
Example
Range("F9").Comment.Text Text:="Abcde" & Chr(10)
& "fghijk" & Chr(10) & "lmnop"

Regards
Klaus

-----Original Message-----
Dear experts,
I have a macro that generates cell comments. Since some

of
them are quite long, I would like to force a line break.
I tried to use the following:
Msg1 = "No data for this product/ probably it" & vbCrLf
Msg1 = Msg1 & "was not being used yet in this quarter"
Workbooks(Product).Worksheets(1).Cells(i, z).AddComment
Msg1

But what I have in return is a linebreak plus a square
symbol (the one Excel uses when not able to identify a
character).
Can you please help me forcing a line break in my

comments?
Many thanks!
Kind regards,
Valeria
.