comments

  • Thread starter Thread starter kev carter
  • Start date Start date
K

kev carter

Hi
I have the following sheetcode that shows the value of a1 in a comment in
cell d8

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Me.Range("a1:a4")) Is Nothing Then Exit Sub
' If ActiveCell = a1.Value
(ThisWorkbook.Worksheets("Sheet1").Range("D8").Comment.Visible = True
ThisWorkbook.Worksheets("Sheet1").Range("D8").Comment.Text
Text:=ActiveCell.Text
' End If
' If ActiveCell.Value = "0" Or ActiveCell.Value = "" Then
' ThisWorkbook.Worksheets("Sheet1").Range("D8").Comment.Visible = False
' End If
End Sub

what i want to do is only have one cell as the active cell and make the
comment the value of the active cell

can anyone help with the code please

thanks in advance

kevin
 
Kev
Try this under Sheet 1
Text in Cell A1, comment in cell C1


ThisWorkbook.Worksheets("Sheet1").Range("C1").Comment.Visible = True
ThisWorkbook.Worksheets("Sheet1").Range("C1").Comment.Text
Text:=Range("A1").Text

:)

Paul
 
Back
Top