Can you please try this:
Code:
Private Sub cmdAS_PS_Click()
Dim FilePicker As FileDialog
Dim varfile As Variant 'variant type variable that will store the selected file path
Dim xlApp As Excel.Application 'the excel application
Dim xlWb As Excel.Workbook 'the excel workbook reference that will point to the opened workbook
Dim xlWs As Excel.Worksheet 'the excel worksheet with data
Dim intLine As Long 'line counter
Dim SelectedFile As String
Dim dbs As DAO.Database
Dim vrtSelectedItem As Variant
Set dbs = CurrentDb
Set FilePicker = Application.FileDialog(msoFileDialogFilePicker)
CurrentDb.Execute "DELETE * FROM tblAppImportAS_CC", dbFailOnError
CurrentDb.Execute "DELETE * FROM tblImportAS_CC", dbFailOnError 'clean the existing database table
FilePicker.AllowMultiSelect = True
FilePicker.Filters.Add "Excel", "*.xls*", 1
FilePicker.InitialFileName = "C:\Users\"
FilePicker.Title = "Please Select the Excel Data..."
IF FilePicker.Show=-1 Then
'If FilePicker.SelectedItems.Count > 0 Then
'SelectedFile = FilePicker.SelectedItems(1)
'Do
' DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblImportAS_PS", SelectedFile, True, "Worksheet!L:P"
'Loop Until FilePicker.SelectedItems.Count = 0
'Once the loop stops, close the open workbook, quit excel, and clean the memory references to the created objects
'Else 'if no file was selected
'Call MsgBox("No file was selected.") 'open message box
'End If
'Step through each string in the FileDialogSelectedItems collection.
For Each vrtSelectedItem In FilePicker.SelectedItems
'vrtSelectedItem is a String that contains the path of each selected item.
'You can use any file I/O functions that you want to work with this path.
'This example displays the path in a message box.
'MsgBox "Selected item's path: " & vrtSelectedItem
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "tblImportAS_PS", vrtSelectedItem , True, "Worksheet!L:P"
'OPEN WORKBOOK
Appplication.FollowHyperlink vrtSelectedItem
Next
'If the user presses Cancel...
Else
Call MsgBox("No file was selected.") 'open message box
End If
Exit Sub
cmdImportExcel_Click_err:
Select Case Err.Number
Case Else
Call MsgBox(Err.Number & "-" & Err.Description, vbCritical + vbOKOnly, "System Error …")
End Select
End Sub