Consulting

Results 1 to 2 of 2

Thread: Listbox items as Hyperlinks

  1. #1

    Listbox items as Hyperlinks

    Hi Guys,
    Is there any way I can make the items in a list box clickable hyperlinks so the users open the files they want. I already have a button that opens all the items with a single click using. ActiveWorkbook.FollowHyperlink filenames(i) with no problem.
    Thank you very much.
    This is the code for the Listbox which shows the items I want:

    Sub Hyperlinks_List()
        For i = 3 To Number_projects
            If filenames(i) <> "NO" Then
                With Hyperlinks
                .AddItem (Replace(filenames(i), Path, ""))
                End With
            End If
        Next i
    End Sub

  2. #2
    I just did this and it is working great, maybe this will help somebody out there.
    Private Sub Hyperlinks_Click()
    For i = 3 To Number_projects
    If Hyperlinks.Selected(i - 3) Then
    ActiveWorkbook.FollowHyperlink filenames(i)
    End If
    Next i
    End Sub

Tags for this Thread

Posting Permissions

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