A
Alen32
I got this code here which work well, but in column C I have hyperlink and
I would like to keep hyperlink function. How I can do that?
Private Sub UserForm_Initialize()
Dim cell As Range
With UserForm1
.ListBox1.RowSource = ""
.ListBox1.ColumnCount = 3
.ListBox1.Clear
End With
Set sh = Worksheets("Ark1")
For Each cell In sh.Range("A10:A250")
If cell.Value = sh.Range("A5").Value Then
With UserForm1
.ListBox1.AddItem cell.Value
.ListBox1.List(.ListBox1.ListCount - 1, 1) = cell.Offset(0,
2).Value
.ListBox1.List(.ListBox1.ListCount - 1, 2) = cell.Offset(0,
5).Value
End With
End If
Next
End Sub
I would like to keep hyperlink function. How I can do that?
Private Sub UserForm_Initialize()
Dim cell As Range
With UserForm1
.ListBox1.RowSource = ""
.ListBox1.ColumnCount = 3
.ListBox1.Clear
End With
Set sh = Worksheets("Ark1")
For Each cell In sh.Range("A10:A250")
If cell.Value = sh.Range("A5").Value Then
With UserForm1
.ListBox1.AddItem cell.Value
.ListBox1.List(.ListBox1.ListCount - 1, 1) = cell.Offset(0,
2).Value
.ListBox1.List(.ListBox1.ListCount - 1, 2) = cell.Offset(0,
5).Value
End With
End If
Next
End Sub