Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Office Web Components: No Open Method of Workbooks? | Excel Programming | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
troubles with the Workbooks.Open method in Excel 97 | Excel Programming | |||
Open method of workbooks fails when Excel is hosted in IE | Excel Programming | |||
Workbooks.Open fails after upgrade to XL2000 from XL97 | Excel Programming |