Can't instantiate a COM object written in C# from VBA (VB6 ok)

后端 未结 5 2009
小鲜肉
小鲜肉 2020-12-08 23:41

Using VS 2008, here is my COM object

using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Wi         


        
5条回答
  •  一向
    一向 (楼主)
    2020-12-09 00:11

    rc1 is correct in that this is a .net error, thrown when Office can't decide which version of the Framework to use. However, Office isn't throwing a wobbly simply because it's spoilt for choice. There is a bug in how Office 2003 interacts with .net 2.0.

    Installing the fix from Microsoft (KB908002) is a more flexible way of solving the problem than by forcing Excel to run in a particular version of .net.

    See also: http://www.biopdf.com/guide/trouble_shoot_microsoft_office_2003.php

提交回复
热议问题