Can anyone see an issue with this code that would cause the above error? It was running fine, before I added the Case "ITEM" into the mix. When the error shows up, VBA is high lighting the "App As Object" in the second Case.
Select Case ImportFile
Case "IADJMATM", "Drawing Rev Excel"
Dim App As Object, FileTemp As String
Set App = CreateObject("Excel.Application")
App.Visible = False
FileTemp = CurrentProject.Path & "\Temp.xls"
Case "BoMChg" 'Added these lines to see if I can pull in BoM\_Chg.xls for the BoM\_Chg Imports
Dim App As Object, FileTemp As String
Set App = CreateObject("Excel.Application")
App.Visible = False
FileTemp = CurrentProject.Path & "\BoM\_Chg.xls"
Case "BoM" 'Added these lines to see if I can pull in BoM\_New.xls for the New BoM Imports
Dim App As Object, FileTemp As String
Set App = CreateObject("Excel.Application")
App.Visible = False
FileTemp = CurrentProject.Path & "\BoM\_New.xls"
Case "ITEM" 'Added these lines to see if I can pull in ITEM.xls for the ITEM Imports
Dim App As Object, FileTemp As String
Set App = CreateObject("Excel.Application")
App.Visible = False
FileTemp = CurrentProject.Path & "\ITEM.xls"
Me.CopyProgress = "Importing File " + Me.File.Column(0, i)
Me.Repaint
App.DisplayAlerts = False
App.Workbooks.Open (Me.File.Column(0, i))
App.ActiveWorkbook.SaveAs FileTemp, FileFormat:=56
App.DisplayAlerts = True
App.Workbooks.Close
End Select