Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
one userform to another damorrison Excel Discussion (Misc queries) 2 August 26th 06 01:10 PM
How do I create a hyperlink to a cell with the hyperlink function S. Bevins Excel Worksheet Functions 2 July 20th 06 08:06 PM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM


All times are GMT +1. The time now is 07:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"