Can't instantiate a COM object written in C# from VBA (VB6 ok)
问题 Using VS 2008, here is my COM object using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using System.Windows.Forms; namespace TestCom { [Guid("9E5E5FB2-219D-4ee7-AB27-E4DBED8E123E")] [ClassInterface(ClassInterfaceType.AutoDual)] [ProgId("Test9.COMINT")] public class TestComClass { public void Init(string userid, string password) { MessageBox.Show(string.Format("{0}/{1}", userid, password)); } } } If I build this and register it on a