Ok, I've read over some old topics on this but they aren't really helping. Basically I've come to the conclusion that excel's autosizing of comments just sucks, but maybe there is something else I can do.
I have a bunch of comments of the form:
Authors: Johnson, A., May, B., Shaffer, F., Morrison, A., Williams, H.
Title: A random title that can be short but is usually quite long, such as this one
Journal: A journal that is also usually quite long, as it includes page numbers, issue date, and so forth
PUBREF: 1232345
Now, each of Author, Title, Journal, and PUBREF are separated by linefeeds (Chr(10)) but nothing else, so when I call the autosize command, it makes the width of the comment box way too long.
I use the following code to account for this:
If .Comment.Shape.Width > 150 Then
boxArea = .Comment.Shape.Width * .Comment.Shape.Height
.Comment.Shape.Width = 150
.Comment.Shape.Height = (lArea / 150) * 1.1
End If
The problem is, this often results in comment boxes that are way too tall. I guess the reason would be that boxArea calculates the area of the comment box even though the entire area isn't used, such as on the PUBREF line which is much shorter than the actual width of the box. Any one got any ideas on a different way to autosize? Maybe I could count characters in my comment box or something...
Thanks
Bookmarks