Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 & Excel with different versions of OS and Excel

Status
Not open for further replies.

montana9550

Programmer
Jul 19, 2004
21
US
I have multiple programs written in VB6 on XP Pro / Office XP that work fine. (VB6 program manipulating Excel XP applications). When I try to use these same programs on a machine with XP Home and Office 2000, I get this error:
"Run-Time Error '-2147023170 Automation Error, Remote Procedure Call Failed"
Excel says it has encountered a problem and will shutdown. But Excel is running in the background only my VB6 program doesn't seem to have access to it. I'm stumped here. Any help would be greatly appreciated. Thanks.
 
I am assuming you are referencing the Microsoft Excel object in your VB project. I would try using the lower version of the object to see if it is compatible with both Excel versions.

Just a thought,
GS
 
In References in VB6, I have the following items checked:
VB for applications,
VB runtime objects and procedures,
VB objects and procedures
OLE automation
Microsoft Excel 10.0 Object Library

I have no other Microsoft Excel Object Libraries that are lower versions. Do I need to manually install one of them, if so where can I get it? How do I install it? Can I reference both object libraries at the same time so I can still use these programs on either platform?

I have a
Microsoft Office 10.0 Object Library
should that be reference because it currently is not.
 
I don't think I would attempt to install two versions of the Excel object, they will probably interfere with each other.

Could you instead install VB on the XP Home machine with Excel 2000, reference the Excel 9.0 object and re-compile it.

-GS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top