I have this code below...
Sub GetFilePath()
Set myFile = Application.FileDialog(msoFileDialogOpen)
With myFile
.Title = "Choose File"
.AllowMultiSelect = True
If .Show <> -1 Then
Exit Sub
End If
FileSelected = .SelectedItems(1)
End With
Range("A" & Rows.Count).End(xlUp).Offset(1) = FileSelected
End Sub
What I need to do is select multiple files and have the paths copied down column A. Now this code works fantastically when you select them one at a time but when you multiselect it only pastes one of the selected file paths to the first empty A column. Any ideas how to fix the code or use something other than getfilepath? Thank you in advance!
Sub GetFilePath()
Set myFile = Application.FileDialog(msoFileDialogOpen)
With myFile
.Title = "Choose File"
.AllowMultiSelect = True
If .Show <> -1 Then
Exit Sub
End If
FileSelected = .SelectedItems(1)
End With
Range("A" & Rows.Count).End(xlUp).Offset(1) = FileSelected
End Sub
What I need to do is select multiple files and have the paths copied down column A. Now this code works fantastically when you select them one at a time but when you multiselect it only pastes one of the selected file paths to the first empty A column. Any ideas how to fix the code or use something other than getfilepath? Thank you in advance!