Shakeable_Drip
Board Regular
- Joined
- May 30, 2023
- Messages
- 52
- Office Version
- 365
- Platform
- Windows
I'm butchering VBA I found.
I'd like to have FilePicker to select files then write those file names to range A1.
I'd like to have FilePicker to select files then write those file names to range A1.
VBA Code:
Sub ChooseFiles()
Dim SourceFileApp As Application
Dim TargetFolderApp As Application
Dim vitemselecetd As Variant
Set SourceFileApp = Application
Set TargetFolderApp = Application
listdepth = Cells(Rows.Count, 1).End(xlUp).Row
With SourceFileApp.FileDialog(msoFileDialogFilePicker) ' get file to replicate
.AllowMultiSelect = True
If .Show = -1 Then
For Each vitemselecetd In .SelectedItems
For x = 1 To listdepth
'write .selecteditems starting at range A1
Next x
Next vitemselecetd
Else
MsgBox "No Source File Chosen"
Exit Sub
End If
End With
End Sub