Column of Hyperlinks

  • Thread starter Thread starter cmiling
  • Start date Start date
C

cmiling

I have a column of hyperlinks adjacent to a column of text. Can I "hide" the
column of hyperlinks behind the column of text so that when you click on the
text, it will take you where the hyperlink would?
 
There is a better way. What you need to do is to use the on click or on
doubleclick event to take you to the address. Here is the text you would use
on the event

Dim strDocPath As String

strDocPath = Me.txtLink
subHyperlinkFollow (strDocPath)

You can then create a generic sub routine to open the hyperlink and store it
in your modules.

Public Sub subHyperlinkFollow(strLinkName As String)
' Open a hyperlink

On Error GoTo Error_subHyperlinkFollow
Application.FollowHyperlink strLinkName, , True

Exit_subHyperlinkFollow:
Exit Sub

Error_subHyperlinkFollow:
MsgBox "Error in subHyperlinkFollow " & Err.Number & " - " &
Err.Description
Resume Exit_subHyperlinkFollow

End Sub

You can change the visible property of your hyperlink to false and you
should be fine.

Neville Turbit
www.projectperfect.com.au
 
Back
Top