Thanks HaHoBe..rather than put the path in each hyperlink, I just put it in cell A1 and reference it in the macro. Updated code below. Will mark this as solved..
Sub CopyListSelectedFiles()
'Copy selected hyperlinked files to selected destination folder
Dim oldpath As String
Dim newpath As String
Dim rng As Range
Dim r As Object
oldpath = Range("A1")
If InStr(1, oldpath, "\", vbTextCompare) Then
Set rng = Selection.SpecialCells(xlCellTypeVisible)
Else
MsgBox "Ensure cell A1 has path of files" & vbNewLine & "e.g. C:\My Files\"
GoTo Nope
End If
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
.Show
On Error Resume Next
newpath = .SelectedItems(1)
err.Clear
On Error GoTo 0
End With
On Error Resume Next
For Each r In rng
FileCopy oldpath & r.Value, newpath & "\" & r
Next
MsgBox "Selected Files Copied to " & newpath
Nope:
End Sub
Bookmarks