Consulting

Results 1 to 6 of 6

Thread: Solved: Selecting Hyperlink using combobox value??

  1. #1
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location

    Solved: Selecting Hyperlink using combobox value??

    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

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    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
    [/vba]

  3. #3
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    We definately aren't worthy 'El Cid'

    Worked great

    Thanks a lot!

    Simon

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by Simon Lloyd
    We definately aren't worthy 'El Cid'

    Worked great

    Thanks a lot!

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

  5. #5
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Okay from now on i shall address you as the Great El Xid!

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I wonder if I can get the admin guys to change my id?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •