![]() |
Getting the FULL text of a Comment
I've tried Cell.NoteText, Cell.Comment.Text, Cell.Comment.Shape.DrawingObject.Text and they all seem to return only the first 255 characters of the Comment. How do I get the full text? I'm not interested in the formatting, just the plain text.
Phil. |
Getting the FULL text of a Comment
Phil,
Typically String variables are limited to 255 characters. If your macro is using the Comment text to feed a String variable, then this limit may be the culprit. Have you tried sending the Comment text to a cell? For example (assuming comment in cell A1 and text going to B1): sheet1.Range("B1").Value = sheet1.Range("A1").Comment.Text |
Getting the FULL text of a Comment
Typically String variables are limited to 255 characters. If your macro is
using the Comment text to feed a String variable, then this limit may be the culprit. Have you tried sending the Comment text to a cell? For example (assuming comment in cell A1 and text going to B1): That's not true. I have strings that are tens of thousands of characters long in the same VBA program. Phil. |
Getting the FULL text of a Comment
Ben:
Typically String variables are limited to 255 characters. If your macro is using the Comment text to feed a String variable, then this limit may be the culprit. Have you tried sending the Comment text to a cell? For example (assuming comment in cell A1 and text going to B1): Me: That's not true. I have strings that are tens of thousands of characters long in the same VBA program. However, as you suggest, assigning cell[1,1]=cell[1.1].comment.text does appear to work, it gets the full text of the comment. Odd then that assigning it to a String variable chops it off, when the string variable can easily contain the full text. Phil. |
Getting the FULL text of a Comment
Hm. Seems to be working now. Not sure what I was doing wrong. Cell.Comment.Text does appear to be returning the full text.
Phil. |
All times are GMT +1. The time now is 02:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com