Hi
I would like to populate a document from a company network from a listbox using the document name and path. I have successfully achieved it with a hyperlink, but the document will be updated at times and i assume if the documents with the same file name then the path would work better than a hyperlink, am i correct? If so how can i amend my code.
Private Sub ListBox1_Change()
Dim strFile As String, f As Range, ws As Worksheet
Set ws = Worksheets("Lenders A-D")
If ListBox1.Value = "" Then Exit Sub
Set f = ws.Range("A:A").Find(ListBox1.Value, , xlValues, xlWhole)
If Not f Is Nothing Then
ActiveWorkbook.FollowHyperlink Address:=ws.Range("C" & f.Row), NewWindow:=False
Unload Me
userformProp.show
End If
End Sub
Bookmarks