Hiperlink

rafaelaguimaraes

01-10-2013 14:36:23

Olá amigos, tenho uma planilha com dados e etc...

Na coluna D existem Hiperlinks que abrem arquivos pdf. Como faço para que esses hiperlinks sejam mostrados no meu listbox de acordo com a pesquisa feita.

Segue a planilha para vocês entenderem melhor a situação.

rafaelaguimaraes

01-10-2013 15:09:49

Vou tentar explicar melhor:

Eu tenho as seguintes estruturas para preencher o meu listbox:

Código: Selecionar todos

Private Sub txtPesquisar_Change()
    TextoDigitado = txtPesquisar.Text
    Call PreencheLista
End Sub

Private Sub PreencheLista()
    Dim ws As Worksheet
    Dim i As Integer
    Dim TextoCelula As String
    Set ws = Worksheets("base")
    i = 1
    ListBox1.Clear
    With ws
        While .Cells(i, 1).Value <> Empty
            TextoCelula = .Cells(i, 1).Value
            If UCase(Left(TextoCelula, Len(TextoDigitado))) = UCase(TextoDigitado) Then
                ListBox1.AddItem .Cells(i, 1)
                ListBox1.List(ListBox1.ListCount - 1, 1) = Worksheets("base").Range("B" & i)
                ListBox1.List(ListBox1.ListCount - 1, 2) = Worksheets("base").Range("C" & i)
                ListBox1.List(ListBox1.ListCount - 1, 3) = Worksheets("base").Range("D" & i)                
            End If
            i = i + 1            
        Wend
    End With
End Sub
Eu preciso que ali onde monta a coluna D, também puxe o hiperlink que eu tenho lá na minha planilha.