View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Brown Gary Brown is offline
external usenet poster
 
Posts: 178
Default Excel Comments Referencing Excel Formula

You can put a macro in the worksheet's Worksheet_Calculate() and change the
Comment text with something like this...

Private Sub Worksheet_Calculate()
Range("B2").Comment.Text Text:=Range("C4").Value
End Sub

Where B2 contains your comment and looks at the value in Cell C4.

--
HTH,
Gary Brown

If this post was helpful to you, please select ''YES'' at the bottom of the
post.



"R Avery" wrote:

I know that you can have TextBox objects in Excel which have
a .DrawingObject.Formula property that you can set programmatically
(or in the GUI) so that whenever you calculate the sheet, if the
underlying cell changes the textbox's text will also change.

Is this possible to do with Excel Comments? I have already tried to
Comment.Shape.DrawingObject.Formula, but it errors out, saying that
you cannot access that property. Is there any way to make the text of
a comment dynamically refer to the contents of a cell?