Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

Want to create a COM library and access it using Office VBA.

 

Created a COM typelibrary, compiled it to register with Interop, and it 'works'. However, all I can see in the object browser is the Class name. I can't see the name of any of the functions in that class. The functions can be called etc, and they work, but I can't see them and can't use intellisense.

 

Any thoughts?

 

Created in C# express edition.

 

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

namespace TestDLL
{
   [ComVisible(true)]
   public class TestFunctions
   {
       [ComVisible(true)]
       public double AddValues(double value1, double value2)
       {
           
           return (value1 + value2);
       }
   }

}

 

Apparently ComVisible defaults to true, but I put that in anyway.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...