Position of Comment
The default appears to be to the right of the little red triangle. Is it possible to have it appear to the left of that, to avoid horizontal scrolling to read it ? Thanks - Kirk |
Position of Comment
AFAIK there is no way to change the "hover" position of a comment. However,
in a selection event, could move a comment to left of the cell if it would otherwise appear off the right edge, but would need to select the cell to trigger it. Eg, try this in the ThisWorkbook module (to cater for all sheets in the wb) Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _ ByVal Target As Range) Dim rt As Single Dim cmt As Comment Application.DisplayCommentIndicator _ = xlCommentIndicatorOnly On Error Resume Next Set cmt = Target(1).Comment On Error GoTo errExit If Not cmt Is Nothing Then With ActiveWindow.VisibleRange rt = .Cells(1, 1).Left + .Width End With If cmt.Shape.Width + 10 + Target.Offset(, 2).Left rt Then cmt.Shape.Left = Target.Left - cmt.Shape.Width - 5 cmt.Visible = True End If End If errExit: End Sub Regards, Peter T "kirkm" wrote in message ... The default appears to be to the right of the little red triangle. Is it possible to have it appear to the left of that, to avoid horizontal scrolling to read it ? Thanks - Kirk |
Position of Comment
On Sun, 8 Jun 2008 12:46:03 +0100, "Peter T" <peter_t@discussions
wrote: AFAIK there is no way to change the "hover" position of a comment. However, in a selection event, could move a comment to left of the cell if it would otherwise appear off the right edge, but would need to select the cell to trigger it. Eg, try this in the ThisWorkbook module (to cater for all sheets in the wb) That's *very* nice Peter, many thanks. You hover over the comment - see it's off screen, click the cell and bingo ! Brilliant ! Cheers - Kirk |
Position of Comment
You explained the workaround much better than I did :-)
Regards, Peter T "kirkm" wrote in message On Sun, 8 Jun 2008 12:46:03 +0100, "Peter T" wrote: AFAIK there is no way to change the "hover" position of a comment. However, in a selection event, could move a comment to left of the cell if it would otherwise appear off the right edge, but would need to select the cell to trigger it. Eg, try this in the ThisWorkbook module (to cater for all sheets in the wb) That's *very* nice Peter, many thanks. You hover over the comment - see it's off screen, click the cell and bingo ! Brilliant ! Cheers - Kirk |
All times are GMT +1. The time now is 08:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com