none
Excel 2007 VSTO - How to open Excel workbook with Calculation = forced Manual?

    Question

  • Is it possible to open workbook and stop or prevent Calculation run? In my case it's pretty long and takes about 10 minutes/

     

     

    Friday, December 03, 2010 12:58 AM

Answers

  • Hi Senglory,

                Welcome to MSDN forum and I am glad to help with you.

    After reading the posts, I knew your meaning and it seems that your project is VSTO workbook project. If not, please let me know.

     As for the issue, I have some methods for you to take consideration:

    1.       Directly set the Calculation options to manual in Designer mode in VS2010 (Formulas->Calculation->Calculation Options->Manual)

    2.       When opening Excel and it is slow during calculation, you can press ESC to abort the calculation.

    3.       Have a single workbook in your XLSTART directory which has been saved in Manual mode.

     

    In addition, here is the article for you to reference:

                    Controlling Calculation

    http://www.decisionmodels.com/calcsecretse.htm

    I hope these can help you to resolve your issue and feel free to follow up after you have tried.

    Best Regards,

    Bruce Song


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Proposed as answer by Bruce Song Wednesday, December 08, 2010 11:37 AM
    • Marked as answer by Bruce Song Thursday, December 09, 2010 9:49 AM
    Tuesday, December 07, 2010 9:14 AM

All replies

  • Hello

    Yes man you can disable or determine the way Excel do autmatic calculation :

    Put this line of code :

           Globals.ThisWorkbook.Application.Calculation = Excel.XlCalculation.xlCalculationManual

     

    Regards

     


    EL MAJDOULI KAMAL
    Friday, December 03, 2010 10:34 PM
  • Yes, but in my case all recalculations occur before ThisWorkbook_Startup. How to open this particular workbook having this option set to Manual outside of this workbook?
    Saturday, December 04, 2010 7:12 PM
  • Hi Senglory,

                Welcome to MSDN forum and I am glad to help with you.

    After reading the posts, I knew your meaning and it seems that your project is VSTO workbook project. If not, please let me know.

     As for the issue, I have some methods for you to take consideration:

    1.       Directly set the Calculation options to manual in Designer mode in VS2010 (Formulas->Calculation->Calculation Options->Manual)

    2.       When opening Excel and it is slow during calculation, you can press ESC to abort the calculation.

    3.       Have a single workbook in your XLSTART directory which has been saved in Manual mode.

     

    In addition, here is the article for you to reference:

                    Controlling Calculation

    http://www.decisionmodels.com/calcsecretse.htm

    I hope these can help you to resolve your issue and feel free to follow up after you have tried.

    Best Regards,

    Bruce Song


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Proposed as answer by Bruce Song Wednesday, December 08, 2010 11:37 AM
    • Marked as answer by Bruce Song Thursday, December 09, 2010 9:49 AM
    Tuesday, December 07, 2010 9:14 AM