PDA

View Full Version : Solved: Selecting Hyperlink using combobox value??



Simon Lloyd
09-15-2006, 01:38 AM
Hi all, i have created a userform to look on another sheet that contains a list of Hyperlinks, what i am trying to do is when the specific link is selected in the combobox (CoursBox) then activate that link, ukcourses is the named range (the entire named range is a list of hyperlinks). Any ideas on how to activate the Hyperlink after selecting it in the combobox?

Regards,
Simon


Private Sub CommandButton1_Click()
Dim rng As Range
Dim mycell
Set rng = Sheets("Course Guides").Range("ukcourses")
With CourseBox.Value
For Each mycell In rng
If mycell.Text = CourseBox.Value Then
mycell = Hyperlink.Activate'''Have Problems Here!
End If
Next
End With
Me.Hide
End Sub

Bob Phillips
09-15-2006, 02:50 AM
Private Sub CommandButton1_Click()
Dim rng As Range
Dim mycell
Set rng = Sheets("Course Guides").Range("ukcourses")
ActiveWorkbook.FollowHyperlink Address:=rng.Cells(CourseBox.ListIndex + 1, 1).Hyperlinks(1).Address
Me.Hide
End Sub

Simon Lloyd
09-15-2006, 06:12 AM
We definately aren't worthy :bow: 'El Cid' :rotlaugh:

Worked great :thumb

Thanks a lot!

Simon

Bob Phillips
09-15-2006, 07:18 AM
We definately aren't worthy :bow: 'El Cid' :rotlaugh:

Worked great :thumb

Thanks a lot!

Simon

I thought I was El Xid :) (I might even adopt that as a moniker).

Simon Lloyd
09-15-2006, 08:52 AM
Okay from now on i shall address you as the Great El Xid! :cool:

Bob Phillips
09-15-2006, 10:01 AM
I wonder if I can get the admin guys to change my id?