Hyperlink from Userform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've created a userform with multiple fields. When one particular field is
filled, I would like to enter that text into the worksheet as a hyperlink.
How do I translate the text from that box to a hyperlink? Thanks!

Mark
 
I'm not exactly sure what you want, but you can try something like

Private Sub CommandButton1_Click()
Dim URL As String
URL = Me.TextBox1.Text
If StrComp(Left(URL, 7), "http://", vbBinaryCompare) <> 0 Then
URL = "http://" & URL
End If
ThisWorkbook.FollowHyperlink Address:=URL
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
Thanks, Chip. I'll try to clarify/simplify the request. In my userform, if
someone enters information in the combobox labeled "Antenna Pattern", I want
that entry to appear in cell P2 as a hyperlink. I'm not sure how to take
your code and make the text appear as a hyperlink in Range("P2").

Thanks!

Mark
 
Back
Top