Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
force a line break in a comment
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
force a line break in a comment
Hi Valeria,
Try vbLF instead of vbCrLf. Regards, Shah Shailesh http://members.lycos.co.uk/shahweb/ (Excel Add-ins) *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Force Page Break in Excel? | Excel Discussion (Misc queries) | |||
Force a comment before exiting a cell | Excel Worksheet Functions | |||
Force line break based on text | Excel Discussion (Misc queries) | |||
Break cell into multiple lines by line break | Excel Discussion (Misc queries) | |||
Force Page Break | Excel Discussion (Misc queries) |