Re: Adding a variable value to a comment?
- From: "Ardus Petus" <ardus.petus@xxxxxxxxxxx>
- Date: Thu, 9 Mar 2006 18:45:36 +0100
Sub PutFormulaInComment()
With ActiveCell
.AddComment (.Formula)
End With
End Sub
HTH
--
AP
"Tom" <Tom@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le message de
news:6FE49A6A-BDAB-4A5F-B50D-4BA5A9830AA4@xxxxxxxxxxxxxxxx
How can I add a variable value to a comment?"Assignment
I want to create a comment that is based on a simple math function.
The comment tag would display the sum of the current cell plus that of one
other.
Here is what I have so far:
-----------------------
dim holdval, commentval
holdval = ActiveCell.Value
ActiveCell.ForumlaR1C1 = "=RC[0]+RC[-3]"
ActiveCell.AddComment
ActiveCell.Comment.Visible = True
commentval = ActiveCell.Value
ActiveCell.Comment.Text = commentval
ActiveCell.Value = holdval
ActiveCell.Select
---------------------------
Line 7 is where I'm getting all the problems. The error I get is
to constant is not permitted". I've also tried this line:way
ActiveCell.Comment.Text Text:= commentval
in which case I get an application error.
Am I just trying to do something that is impossible or is there another
to get a variable value into a comment?
Thanks!
.
- Prev by Date: .XLA versus XLS *** code
- Next by Date: Re: call multiple macros in workbook_open?
- Previous by thread: .XLA versus XLS *** code
- Next by thread: Re: Adding a variable value to a comment?
- Index(es):