列出多个文件的完整文件path并粘贴到特定列

我需要帮助改变下面的代码,所以我可以得到所选多个文件的完整文件path:

Dim xRow As Long Dim xDirect$, xFname$, InitialFoldr$, xpaths InitialFoldr$ = "C:\" 'Startup folder to begin searching from With Application.FileDialog(msoFileDialogFolderPicker) .InitialFileName = Application.DefaultFilePath & "\" .title = "Please select a folder to list Files from" .InitialFileName = InitialFoldr$ .Show If .SelectedItems.Count <> 0 Then xDirect$ = .SelectedItems(1) & "\" xFname$ = Dir(xDirect$, 7) Do While xFname$ <> "" Range("A2").Offset(xRow) = xFname$ xRow = xRow + 1 xFname$ = Dir Loop End If 

 Dim xRow As Long Dim xDirect$, xFname$, InitialFoldr$, xpaths InitialFoldr$ = "C:\" 'Startup folder to begin searching from With Application.FileDialog(msoFileDialogFolderPicker) .InitialFileName = Application.DefaultFilePath & "\" .Title = "Please select a folder to list Files from" .InitialFileName = InitialFoldr$ .Show If .SelectedItems.Count <> 0 Then xDirect$ = .SelectedItems(1) & "\" xFname$ = Dir(xDirect$, 7) Do While xFname$ <> "" Range("A2").Offset(xRow) = xDirect$ & xFname$ xRow = xRow + 1 xFname$ = Dir Loop End If End With