With reference to this post ... https://www.excelforum.com/excel-pro...heet-cell.html, I am struggling to figure out a VBA solution to one of the components of my original post there. The solution provided fundamentally works (thank you Kokosek and Lewis), but I have not been able to figure out yet how to display the unique 'texttip' for the row that the user is hovering over. The code, as it is now, displays the same 'texttip' for each cell in that particular range (all the + in column I display "Heavy", ~ in column J display "Moderate" and "Light for column J's - ). I need to enhance those messages based on the row as: (apologize for being unable to display tabular, there are three columns of data illustrated here)
Sym Row Message
+ 13 > 10 cm
+ 14 > 10 cm
+ 15 > 10 cm
+ 16 > 5 mm
+ 17 >5 mm
+ 18 >5 mm
+ 19 > 45 kph
~ 13 5-10 cm
~ 14 5-10 cm
~ 15 5-10 cm
~ 16 1-5 mm
~ 17 1-5 mm
~ 18 1-5 mm
~ 19 20-45 kph
- 13 <5 cm
- 14 <5 cm
- 15 <5 cm
- 16 <1 mm
- 17 <1 mm
- 18 <1 mm
- 19 <20 kph
Would anyone like to assist me in how to best approach this ... to display the appropriate 'texttip' based on which cell within the range the pointer is positioned? I suspect it might involve this portion of code, but I am unsure how to get the value for "srow" identified in my commented out lines of code. Perhaps it can't be done?
Function GetScreenTipTextValue(v As Variant) As String
'This returns 'Screen Tip Text' Values for certain inputs
Dim sScreenTipText As String
Select Case v
Stop
Case "+"
sScreenTipText = "Plus"
'if srow =>13 and row <= 16 then sScreenTipText = ">10 cm"
'if srow =>17 and row <= 18 then sScreenTipText = ">5 mm"
'if srow = 19 then sScreenTipText = ">45 kph"
Case "~"
sScreenTipText = "Moderate"
'if srow =>13 and row <= 16 then sScreenTipText = "5-10 cm"
'if srow =>17 and row <= 18 then sScreenTipText = "1-5 mm"
'if srow = 19 then sScreenTipText = "20-45 kph"
Case "-"
sScreenTipText = "Minus"
'if srow =>13 and row <= 16 then sScreenTipText = "<5 cm"
'if srow =>17 and row <= 18 then sScreenTipText = "<1 mm"
'if srow = 19 then sScreenTipText = "<20 kph"
End Select
'Set the return value
GetScreenTipTextValue = sScreenTipText
End Function
Bookmarks