-1

is it possible to include some kind of libraries inside of VBA that will enable me to use c# functions that i wrote?

Alex Gordon
  • 54,010
  • 276
  • 644
  • 1,024

2 Answers2

5

You need to expose managed code to COM using the [ComVisible] attribute.

For more information, see here.

EDIT: For example:

[ComVisible(true)]
public class MyClass {
    public int GetNumber(string name) { ... }
}
SLaks
  • 837,282
  • 173
  • 1,862
  • 1,933
3

You need to use the ComVisible attribute. Here's a similar question

Community
  • 1
  • 1
ichiban
  • 6,163
  • 3
  • 26
  • 34