Getting the FULL text of a Comment

  • Thread starter Thread starter Phil Hibbs
  • Start date Start date
P

Phil Hibbs

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.
 
Phil,

Typically String variables are limited to 255 characters. If your macro isusing 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
 
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.
 
Ben:
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top