This syntax works, but it allows for multiple file selection, is there a way to alter it so that you can only select one file, and a notification will be displayed if you attempt to select more than 1 file?
Code:
Set f = Application.FileDialog(3)
With f
.AllowMultiSelect = False
.Title = "Please Select the Excel File To Import"
.Filters.Add "Excel Files", "*.xlsx"
If .Show = True Then
For i = 1 To f.SelectedItems.Count
selectedfile = f.SelectedItems(i)
DoCmd.TransferSpreadsheet acImport, param, "AccessTableName", selectedfile, True
Next i
End If
End With