davesexcel.com

Excel information

Most Popular Excel Questions

Comment to include value from another cell

Posted by davesexcel on March 29, 2012 at 7:50 PM

I want to add a comment to H1 and place what is in Cell A1 to be in the comment.

You can use VBA to add a comment and have what is in A1 in the comment box.


Sub CommentBox()

    Dim A1 As Range

    Set A1 = Range("A1")

    With Range("H1")

        .Comment.Delete

        .AddComment

        .Comment.Visible = False

        .Comment.Text Text:=A1.Text

        .Comment.Shape.TextFrame.AutoSize = True

    End With

End Sub

 

 


Categories: None

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

You must be a member to comment on this page. Sign In or Register

0 Comments