none
Excel 2010 x64: VB7 create object throw 'the system cannot find the file specified ' RRS feed

  • Question

  • The environment  I am working in as follow:
    Window 2008 R2 x64
    Excel 2010 x64
    Visual studio 2008

    VB7 Code
    Public Sub OnTest(ByRef control As IRibbonControl)
         MsgBox "test"
         CreateObject ("TestComx64.CustAddinComponent")
         myRibbon.Invalidate
    End Sub
    But it runs at excel 2010 x86.

    Roy Wang
    Wednesday, December 21, 2011 2:46 AM

Answers

  • I fixed the issuse.

    Rebuild define class interface.

    [ComVisible(true)]

        [ProgId("TestComx64.CustAddinComponent ")]

        [Guid("xxxxxxx-8c07-4959-bc59-xxxxxxx")]

        [ClassInterface(ClassInterfaceType.AutoDispatch)]

        public class  CustAddinComponent   

        {

            public  CustAddinComponent ()

            {

            }

            [DispId(0)]

            public void InterfaceTest()

            {

                System.Windows.Forms.MessageBox.Show("TEST ");

            }

    }

     


    Roy Wang
    • Marked as answer by Roy.Wang Wednesday, December 28, 2011 12:32 AM
    Wednesday, December 28, 2011 12:31 AM