View Full Version : Explanation of Cell Comments?
GreenTree
06-12-2007, 05:40 PM
I have a project I'm working on where I'd like to enter comments into a bunch of cells by means of visual basic instructions.  I can do the really basic stuff by recording macros, but there's LOTS of stuff there that I don't understand very well.  (Being unable to play back some of the macros that I record doesn't really help!)  Is there a tutorial out there someplace that explains the various things you can do with cell comments, particularly in terms of making the comment block a particular, predictable size, and formatting the text within the comment?
Many thanks,
G.T.
:dot:
geekgirlau
06-12-2007, 06:32 PM
The object browser is a good place to start, as is Help for the comment object. For example, the following text creates a comment and sets the width and height. You can set a number of the formatting options using the Shape property, but although Shape has a number of "TextEffect" properties, they seem to apply only to WordArt objects so I don't know whether Font can be changed.
 
    With Worksheets(1).Range("e5").AddComment
        .Visible = False
        .Text "reviewed on " & Date
        .Shape.Width = 100
        .Shape.Height = 100
        .Shape.ThreeD.Visible = True
    End With
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.