Hi,
I have a force comment when the formula value reaches the condition.
the problem is the comment appears on the cell where the value was changed.
can help to force the comment to appear on a specified cell?
this is what I have...
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Str As String
Dim cmt As Comment
On Error Resume Next
If Not Intersect(Target, Range("E5:E37")) Is Nothing Then
Range("e3").Formula = "=f3-d3"
If Range("e3").Value > 0.2 Then
Str = InputBox("Your Manhours this month is 20% more than the previous. Comment why.")
With Target
.AddComment
.Comment.Text Text:=Application.UserName & Chr(10) & Str
End With
Set cmt = Target.Comment
With cmt.Shape.TextFrame.Characters.Font
.Name = "Tahoma"
.FontStyle = "Regular"
.Size = 8
End With
End If
End If
End Sub
Bookmarks