Show Comment when in the cell

M

Manju

Is it possible to make a comment appear when the keyboard cursor goes
to that particular cell instead of mouse moving on to the cell?
Manju
 
C

CLR

This one will toggle it on and off with each selection of the cell.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
On Error Resume Next
If ActiveCell.Comment.Visible = True Then
ActiveCell.Comment.Visible = False
Else
ActiveCell.Comment.Visible = True
End If
End Sub

hth
Vaya con Dios,
Chuck, CABGx3
 
G

Gary''s Student

Put this in worksheet code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cmt As Comment
Set cmt = Target.Comment
If cmt Is Nothing Then
Exit Sub
End If
Target.Comment.Visible = True
End Sub


now both cursor keys and MouseOver will make a comment visible.
 
M

Manju

You can also show messages by adding data validation to a cell

Select the cell, and choose Data>Validation
On the Input Message, enter a title and the message.
Click OK

There's a bit more information here:
http://www.contextures.com/xlDataVal04.html

Thanks Debra,
That is exactly what I needed. Thanks to others also. But I slightly
fear from using VB Code.
Thanks to all
Manju
 
Top