• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Hover over cell to read content

Is it possible to hover over a cell to read the content. I have a cell with a large amount of text, i dont want to make the box bigger. I would like the user to be able to hover over the cell and read everything which is written.

Thanks
 
Hi Lesley ,

That is exactly what Khalid has suggested as a solution ; each time you change the active cell by moving the cursor , you can use VBA to enter the cell contents into a comment , so that you can read the entire contents of the cell , without having to do anything.

Narayan
 
Hi,

There is another way (non vba)
Right Click > Insert > Hyperlink > Place in This doc > ScreenTip

Mouse Over.PNG

Insert full msg in the Screen Tip Text:
See the file with example:

Regards,
 

Attachments

  • Mouse Over.xlsm
    12.3 KB · Views: 198
Hello Vletm,
I used this code and then protected now it get error ( cell you are trying to change is protected) unprotect sheet first . the debug shows on the bold ( .addComment.Value

Code is below but i want to have the sheet protected how can we go about it with the protected sheet without allowing the password enteery

Screen Shot 2018-12-20 at 13.32.42.png

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If prevcell Is Nothing Then Set prevcell = Target
  If prevcell.Address <> Target.Address Then
  prevcell.ClearComments
  End If
  If TypeName(Target.Value) <> "String" Then Exit Sub
 
  With Target
  On Error Resume Next
  .ClearComments
  On Error GoTo 0
.AddComment .Value
  With .Comment
  .Shape.TextFrame.AutoSize = False
  HEIGHT1 = (Len(.Text) / 30) * 15.5
  .Shape.LockAspectRatio = msoFalse
  .Shape.Width = 150
  .Shape.Height = HEIGHT1
  End With
  End With
  Set prevcell = Target
End Sub
 
Last edited by a moderator:
Adolf>fernands
1) Did You this?
Screenshot 2019-02-24 at 12.52.43.png
I tested that few times and it works...
That code looks same as in original file.

2) Which cell?

3) Use Code- tags as written in tip!
 

Attachments

  • Comments_Example.xlsm
    14.7 KB · Views: 148
Back
Top