I just whipped this up, thought it may be of use to people. add this code to a module, and you have the full functionality of a hyperlink in VB. Does display changes for MouseOver etc. Pass the LinkUp the function you want to call for the particular textbox 'link' and you're away. Have fun.


VB Code:
  1. 'Constants
  2. Private Const HYPERLINK_HIGHLIGHT As Long = vbYellow
  3. Private Const HYPERLINK_COLOUR As Long = vbBlue
  4.  
  5. 'Hyperlink code selection flag
  6. Private flgHyperLinkSelected As Boolean
  7.  
  8. 'Depress textbox hyperlink
  9. Public Sub LinkDown(txtLink As TextBox)
  10.     'Remove focus from text box
  11.     HideCaret txtLink.hwnd
  12.    
  13.     'Change label to selected colour
  14.     txtLink.ForeColor = HYPERLINK_HIGHLIGHT
  15.    
  16.     'Enable option selected flag
  17.     flgHyperLinkSelected = True
  18.    
  19.     'Remove focus from text box
  20.     HideCaret txtLink.hwnd
  21. End Sub
  22.  
  23. 'Highlight textbox hyperlink
  24. Public Sub LinkOver(txtLink As TextBox, X As Single, Y As Single)
  25.     'Show highlight image when mouse moves over link text
  26.     If Not (flgHyperLinkSelected) Then
  27.         With txtLink
  28.             If (X < 0) Or (Y < 0) Or (X > .Width) Or (Y > .Height) Then
  29.                 'Release picture handle
  30.                 ReleaseCapture
  31.                 'Unhighlight incident code
  32.                 txtLink.FontUnderline = True
  33.                 txtLink.ForeColor = HYPERLINK_COLOUR
  34.             Else
  35.                 'Capture label handle
  36.                 SetCapture .hwnd
  37.                 'Highlight incident code
  38.                 txtLink.FontUnderline = False
  39.                 txtLink.ForeColor = HYPERLINK_HIGHLIGHT
  40.             End If
  41.         End With
  42.     End If
  43.    
  44.     'Remove focus from text box
  45.     HideCaret txtLink.hwnd
  46. End Sub
  47.  
  48. 'Click textbox hyperlink
  49. Public Sub LinkUp(txtLink As TextBox, X As Single, Y As Single, objActionObj As Object, strActionFunc As String, Optional varArgs As Variant)
  50.     'Remove focus from text box
  51.     HideCaret txtLink.hwnd
  52.    
  53.     'Check mouse location
  54.     If (X > 0 And X < txtLink.Width) And (Y > 0 And Y < txtLink.Height) Then
  55.         'Call action function
  56.         CallByName objActionObj, strActionFunc, VbMethod, varArgs
  57.     End If
  58.    
  59.     'Disable selected flag
  60.     flgHyperLinkSelected = False
  61.    
  62.     'Release label handle
  63.     ReleaseCapture
  64.    
  65.     'Unhighlight incident code
  66.     txtLink.FontUnderline = True
  67.     txtLink.ForeColor = HYPERLINK_COLOUR
  68.  
  69.     'Remove focus from text box
  70.     HideCaret txtLink.hwnd
  71. End Sub



To use:
VB Code:
  1. Private Sub Text1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  2.     'Press link
  3.     Call LinkDown(Text1(Index))
  4. End Sub
  5.  
  6. Private Sub Text1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  7.     'Highlight link
  8.     Call LinkOver(Text1(Index), X, Y)
  9. End Sub
  10.  
  11. Private Sub Text1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  12.     'Call LinkUp when mouse up on textbox
  13.     Call LinkUp(Text1(Index), X, Y, frmLesson, "FunctionName", Index)
  14. End Sub