AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 2,099
- Office Version
- 2019
- 2010
- Platform
- Windows
Could someone help me with this code please?
From a d-click in Sheet1 I want to display a Comment that's in a different worksheet.
Its location is SheetAC Col Jxxx. xxx is "The RowNumber" below.
That doesn't seem to do anything. When corrected, would I see the popup comment (with Sheet1 active) or would I need sheet AC active?
From a d-click in Sheet1 I want to display a Comment that's in a different worksheet.
Its location is SheetAC Col Jxxx. xxx is "The RowNumber" below.
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
Dim sh As Worksheet, p As String, TheRowNumber As Integer
p = Cells(Target.Row, Target.Column)
'get the Row Number in AC Sheet containing p
TheRowNumber = FindRow(p, "AC")
Set sh = Worksheets("AC")
sh.Range("J" & TheRowNumber).Comment.Visible = True
End Sub
That doesn't seem to do anything. When corrected, would I see the popup comment (with Sheet1 active) or would I need sheet AC active?