Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel fails to open workbook using Automation from VB 6
I am getting an error some machines where I have a VB 6 application
installed. The error is: Err Number=-2147417851 Method '~' of object '~' failed Err line number=[897] Dim xlWB As Excel.Workbook Dim xlWS As Excel.Worksheet line 897 is: 897: Set xlWB = xlapp.Workbooks.Open(sFileCopyDest) The user is running: Windows version is Microsoft Windows XP 5.1 Build 2600 Microsoft Excel 2003 11.0.6355.0 Microsoft Word 2003 11.0.6502.0 The file being opened is there, no problems. It is an Excel 2003 file on the users machine. I looked this up in WINERROR.H and the error referenced is "server threw an exception." I searched around and found this link: http://support.microsoft.com/default...b;en-us;891013 which says, in part: "When you programmatically add a new worksheet to an Excel object that is contained in an Excel window that is not currently the active window, the worksheet is not added, and you receive the following error message: The server threw an exception. (0x80010105)" I am not doing an Add, although add would be similar in behavior? This works OK on my development machine in the Visual Studio 6 environment with Office 2003 installed. The code is compiled to P-code to try and solve the problem. That did not help. I have tested on several machines amd the error does not always occur. It does not seem to occur on machines running prior versions of Excel, which suggests that the hotfix will work. How would I get the hotfix to users? Thanks for your help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 fails to open documents | New Users to Excel | |||
Workbook fails to open - Excel 2003 | Excel Discussion (Misc queries) | |||
Excel Template fails to open??? | Excel Discussion (Misc queries) | |||
Failure to open workbook via automation | 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 |