How to change the calculation property

  • Win NT, Excell 2000


    I need to change the calculation property in a workbook using windows scripting. The problem is on a scheduled task I open workbook it updates it's calcs and then is saved under a new name. I need to save the new workbook with the calculation property set to manual so that when it is opened later the values are not updated again. Help please!

  • I use the below macros when I need Manual calc for my worksheet.....


    Sub Auto_Open()
    Application.Calculation = xlCalculationManual
    End Sub



    and then......


    Sub Auto_Close()
    Application.Calculation = xlCalculationAutomatic
    End Sub


    Hope this helps you out a little....

  • Welcome to the board...


    You could have an alternative to the above response


    Sub Auto_Open()
    if activeworkbook.name = "YourFilename" then
    Application.Calculation = xlCalculationAutomatic


    else
    Application.Calculation = xlCalculationManual
    endif
    End Sub



    and then......


    Sub Auto_Close()
    Application.Calculation = xlCalculationAutomatic
    End Sub



    This could work as you stated that after the file get updated it is saved as a new filename.


    Hope this makes sense


    DW

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!