Notiophilus
Registered User.
- Local time
- Today, 10:54
- Joined
- Jan 18, 2015
- Messages
- 42
[SOLVED] Mimicking hyperlink behaviour (tooltip, cursor) in VBA
I want to use my own VBA hyperlink function, which is just FollowHyperlink + error handling to copy broken links to clipboard, to replace the default =[Title]#[Link]#.
It works perfectly, but is there a way to mimic, in a report
Running Access 2010.
Cheers (and a happy new year)
I want to use my own VBA hyperlink function, which is just FollowHyperlink + error handling to copy broken links to clipboard, to replace the default =[Title]#[Link]#.
It works perfectly, but is there a way to mimic, in a report
- the very useful "tooltip = URL" behaviour of the original? Okay, scratch that, I found a solution literal seconds after posting this. And then I found a better one.*
- cursor changing to hand on mouseover? (pretty sure this one is easy and I've simply been looking in the wrong places)
Code:
On Error GoTo ErrHandler
If Me.Link <> txtTitleAll.ControlTipText Then 'prevents endless flickering on mouseover
Application.Echo False
If Not IsNull(Me.Link) Then
txtTitleAll.ControlTipText = Me.Link
Else
txtTitleAll.ControlTipText = ""
End If
Application.Echo True
End If
ExitHandler:
Exit Sub
ErrHandler:
Application.Echo True
Resume Next
Cheers (and a happy new year)
Last edited: