Hi,

I am trying to open an Excel spreadsheet from Access using the following code in Access:

Private mobjXL As Excel.Application

Private Sub cmdImportFiles_Click()
Dim wrk As Excel.Workbook
Set mobjXL = New Excel.Application
With mobjXL
.ScreenUpdating = False
.Visible = false
.DisplayAlerts = False
Set wrk = mobjXL.Workbooks.Open("Excel file path and name")
' Do something with the Excel spreadsheet
End With
' error handler
End Sub

I keep getting an error message of 'Method 'Open' of object Workbook failed' everytime Excel tries to open the spreadsheet (and it can be any spreadsheet). Any suggestions on how to open the Excel spreadsheet in VBA without the error message?

Regards
Justin