Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 fails to open documents VladimirF New Users to Excel 2 May 12th 08 05:33 PM
Workbook fails to open - Excel 2003 nc Excel Discussion (Misc queries) 1 February 2nd 06 06:33 PM
Excel Template fails to open??? Rob Smith Excel Discussion (Misc queries) 2 April 11th 05 06:42 PM
Failure to open workbook via automation VanS[_2_] Excel Programming 0 February 4th 05 09:37 PM
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 Frank Jones Excel Programming 2 June 15th 04 03:21 AM


All times are GMT +1. The time now is 03:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"