none
Migrate excel worksheets from VBA macros to VSTO automation add-in functions RRS feed

  • Question

  • Hi,

    I have an excel worksheet with some macros on it created using VBA(.xla) excel add-in.

    I have moved all my marcos to VSTO Automation add-in functions.

    Now when I want to use my excel sheet with VBA macros in this new VSTO environment. When I open my sheet, it throws errors for every query because it is not able to find the macro in the path from which it got created.

    How do I migrate the worksheet to VSTO now?

    Thanks for any help in advance!!!

    Regards,

    Poornima

    Monday, September 16, 2013 10:33 AM

Answers

  • Hi,

    To change all your macros to VSTO functions, you need to convert your VBA code to C# or VB.NET.

    There are 2 types of Office Solutions in Visual Studio:

    Application-Level Add-Ins

    Document-Level Customizations

    Which one are you currently using?

    Since you have changed your macros to VSTO, I think you don’t need macros in your workbook; so what do you mean by “because it is not able to find the macro in the path from which it got created”?

    To move the VBA macro to VSTO function, you should change the VBA code to C# or VB.NET programming manually and delete all the VBA macros add-in from your workbook.

    Have you tried to remove all macros from your workbook?


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 19, 2013 3:12 AM
    Moderator

All replies

  • Hi,

    To change all your macros to VSTO functions, you need to convert your VBA code to C# or VB.NET.

    There are 2 types of Office Solutions in Visual Studio:

    Application-Level Add-Ins

    Document-Level Customizations

    Which one are you currently using?

    Since you have changed your macros to VSTO, I think you don’t need macros in your workbook; so what do you mean by “because it is not able to find the macro in the path from which it got created”?

    To move the VBA macro to VSTO function, you should change the VBA code to C# or VB.NET programming manually and delete all the VBA macros add-in from your workbook.

    Have you tried to remove all macros from your workbook?


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, September 19, 2013 3:12 AM
    Moderator
  • It is a good idea to review this book

    From VBA to VSTO is Excel's New Engine for You?

    Dr.Gerard M. Verschuuren

    ISBN: 1-932802-14-2

    Chapter 2.5

    Tuesday, October 8, 2013 5:19 PM