Hyperlink screentip (VBA)

justinjam

New Member
Joined
May 4, 2011
Messages
3
Hello All,
I need some advice from Excel Guru's who know how to resolve the current challange am having (Excel 2007). The procedure is to have a dynamic screentip from Hyperlink - BUT the screeptip text is not updated herein and only show static initial value. I have included the code to illustrate what I have tried so far.

Code:
Private Sub Worksheet_FollowHyperlink(ByVal target As Hyperlink)
'OK :)
    If Me.Name = "frmPersonnel" And target.Range.Address = "$N$5" Then
        If target.TextToDisplay = "Emp.B ID" Then
                target.TextToDisplay = "Emp.A ID"
                target.Range.Offset(1, 0).Value = Me.Range("EmpID_A")
                'Target.Range.Offset(1, 0).Value = Target.Range.Offset(2, 1).Value  '//empty value
                target.ScreenTip = "Click to display ID from Employer B"
        Else
                target.TextToDisplay = "Emp.B ID"
                target.Range.Offset(1, 0).Value = Me.Range("EmpID_B")
                'Target.Range.Offset(1, 0).Value = Target.Range.Offset(2, 0).Value
                target.ScreenTip = "Click to display ID from Employer A"
        End If
    End If
End Sub
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,224,527
Messages
6,179,348
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top