I have the following code setup to import a file, eventually files, and move the selected file(s) to a new folder. Everything works great. I am trying to figure out how I can apply the "TransferSpreadsheet" and "FSO_File_Move" pieces to each file selected. I've thought about For-Next statements, but they haven't worked so far.
Code:
Set importFile = Application.FileDialog(msoFileDialogFilePicker)
With importFile
.Title = "Choose which file(s) to import"
.AllowMultiSelect = False
If .Show = -1 Then
fileName = .SelectedItems(1)
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "Transsend_M4", fileName, True
fileNameNew = Tools.GetFilenameFromPath(fileName)
FSO_File_Move fileNameNew, filePath, newFilePath
Else