![]() |
Hyperlink from Userform
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 |
Hyperlink from Userform
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) "MAWII" wrote in message ... 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 |
Hyperlink from Userform
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 "Chip Pearson" wrote: 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) "MAWII" wrote in message ... 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 |
All times are GMT +1. The time now is 05:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com