Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlink in TextBox

Status
Not open for further replies.

jajinder

Technical User
Mar 11, 2004
88
NL
Hi, Question already exsist, but the answer is not available anymore. How do I format the text in an TextBox as a Hyperlink? This is what I have, but does not work.
Private Sub TextBox19_Click()
ActiveCell.Hyperlinks.Add ActiveCell, TextBox19.Value, , , "Click to activate!"
End Sub
This code does not work....

Greets Jajinder
 
Got it from another forum.
'With only a hyperlink
Private Sub TextBox1_Enter()
Dim sLinkToFollow As String
sLinkToFollow = TextBox20.Value
ActiveWorkbook.FollowHyperlink Address:=sLinkToFollow
End Sub

'With an e-mailadress
Private Sub TextBox1_Enter()
Dim sLinkToFollow As String
sLinkToFollow = "mailto:" & TextBox19.Value
ActiveWorkbook.FollowHyperlink Address:=sLinkToFollow
End Sub

Greets Jajinder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top