comments

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
 
P

Paul Watkins

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top