FileDialog not working in Access 2016
<p>I am using FileDialog code for importing Excel table(s) into Access 2013-32 bit that works exactly like I want.  When I use the code in Access 2016 I get an error in code that says "Can't find project of library".  I have checked my references and they appear to be the same.</p>

<p>Here is my code:</p>

<pre><code>Private Sub Command2_Click()
Dim JobName As String 
Dim f As FileDialog
Dim tblImport As String
Dim varfile As Variant
Dim MyJobs As DAO.Recordset

JobName = lbl1.value


DoCmd.Close


Set f = Application.FileDialog(msoFileDialogFilePicker)

With f
.Title = "Choose Excel File(s) to Import"
.Filters.Clear
.Filters.Add "Excel Files", "*.xlsx"
.AllowMultiSelect = True


If f.Show = True Then

For Each varfile In .SelectedItems
    Msgbox "IMPORTING: " &amp; varfile
    tblImport = varfile
    DoCmd.TransferSpreadsheet acImport, 10, "Parts", tblImport, True
Next varfile


'Add Job Name to Parts Table
TempVars("jobName") = JobName
DoCmd.OpenQuery "Update Job Name"

'Add Job Name to Jobs Table
Set MyJobs = CurrentDb.OpenRecordset("Jobs")
MyJobs.AddNew
MyJobs![JobName] = JobName
MyJobs.Update


Set f = Nothing

Else

Msgbox "You Cancelled."

End If
End With

End Sub
</code></pre>