locked
How to create VS2013 C# class library that can be called from VBA RRS feed

  • Question

  • I am looking for an example of how to create and register a class library in C# VS2013 using the 4.0 Framework that can be called from VBA (early or late binding).  I have tried a variety of pre-VS2013 samples found via Google, but still running into trouble where testing it via Excel throws an error about Runtime error 429, ActiveX component cant create object.

    Is there a simple hello world example out there someone can point me to? 

    • Moved by Amanda Zhu Thursday, August 7, 2014 8:08 AM
    Wednesday, August 6, 2014 2:34 PM

Answers

  • Hi wimpy1,

    Have you checked this MSDN document? It contains the detials about how to call C# code from VBA.

    How to: Expose Code to VBA in a Visual C# Project


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Caillen Thursday, August 7, 2014 8:16 AM
    • Proposed as answer by Magnus (MM8)MVP Thursday, August 7, 2014 9:41 AM
    • Marked as answer by Caillen Monday, August 18, 2014 3:16 AM
    Thursday, August 7, 2014 8:09 AM

All replies

  • Hi,

    I moved this thread to Visual C# forum for better support.

    Thanks,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, August 7, 2014 8:09 AM
  • Hi wimpy1,

    Have you checked this MSDN document? It contains the detials about how to call C# code from VBA.

    How to: Expose Code to VBA in a Visual C# Project


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Caillen Thursday, August 7, 2014 8:16 AM
    • Proposed as answer by Magnus (MM8)MVP Thursday, August 7, 2014 9:41 AM
    • Marked as answer by Caillen Monday, August 18, 2014 3:16 AM
    Thursday, August 7, 2014 8:09 AM