none
VB.Net DLL with Excel 2013 RRS feed

  • Question

  • Dear,

    I have  create a "Class Library" in VB.Net and i am calling this DLL from Excel Sheet. 

    THis DLL contains forms which takes some parameters and executes, when the user clicks "Show" in the form of DLL, the data is to be imported to the ActiveSheet from where the DLL has been invoked.

    Please let me know some code or links for reference.

    Thanks

    Sreeram


    Madhukar

    • Moved by Fred Bao Friday, December 12, 2014 3:27 AM Move to a more appropriate forum
    Thursday, December 11, 2014 8:01 AM

Answers

  • Hi Madhukar,

    >>I have  create a "Class Library" in VB.Net and i am calling this DLL from Excel Sheet. 

    THis DLL contains forms which takes some parameters and executes, when the user clicks "Show" in the form of DLL, the data is to be imported to the ActiveSheet from where the DLL has been invoked.<<

    As far as I know, we can't call a common dll from VBA. Did you mean you register it as a COM? If I understood correctly, you can add the reference from VBE->Tools->References and then just like use any other libraries.

    Also we can create application add-in or document customization and then call its code from VBA, here are somce links for your reference:
    Walkthrough: Calling Code in an Application-Level Add-in from VBA

    Combining VBA and Document-Level Customizations

    In addtion, we also can automate Office application in a normal windows form:
    Automating Applications Using the Office Object Model

    Regards & Fei


    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.


    Friday, December 12, 2014 7:00 AM
    Moderator

All replies

  • Hello Madhukar,

    Since this issue is related with office, i move it to the office related forum.

    The current forum you posted to is used to discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection.

    Regards.


    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.

    Friday, December 12, 2014 3:26 AM
  • Hi Madhukar,

    >>I have  create a "Class Library" in VB.Net and i am calling this DLL from Excel Sheet. 

    THis DLL contains forms which takes some parameters and executes, when the user clicks "Show" in the form of DLL, the data is to be imported to the ActiveSheet from where the DLL has been invoked.<<

    As far as I know, we can't call a common dll from VBA. Did you mean you register it as a COM? If I understood correctly, you can add the reference from VBE->Tools->References and then just like use any other libraries.

    Also we can create application add-in or document customization and then call its code from VBA, here are somce links for your reference:
    Walkthrough: Calling Code in an Application-Level Add-in from VBA

    Combining VBA and Document-Level Customizations

    In addtion, we also can automate Office application in a normal windows form:
    Automating Applications Using the Office Object Model

    Regards & Fei


    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.


    Friday, December 12, 2014 7:00 AM
    Moderator