mouse pointer over cell

A

Atishoo

Can I make the contents of a variable cell (an offset cell depending on the
current date) appear when the mouse pointer hovers over a cell.
Have tried using a comment box but this seems only to display the data
directly entered and will not accept a function such as "=offset (c,0)" I
knew perfectly well it wouldnt work but tried it anyway! Why do I do that??
 
M

Mike H

Hi,

As far as I'm aware there's no mouse_over event in excel but here's a messy
workaround that does what you want when the cell is selected.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
Range("A1:A100").ClearComments
If Target.Offset(, 3).Text <> "" Then
Target.AddComment
Target.Comment.Text Text:=Target.Offset(, 3).Text
End If
End If
End Sub

Mike
 

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