+ Reply to Thread
Results 1 to 2 of 2

How to set Application.Calculation = xlCalculationManual from commandline params?

  1. #1
    Registered User
    Join Date
    08-26-2008
    Location
    Los Angeles
    Posts
    7

    Question How to set Application.Calculation = xlCalculationManual from commandline params?

    I have a workbook with tons of macros and all of them start recalculation when I open this workbook in Explorer. I wonder if it's possible to set Application.Calculation = xlCalculationManual not from the VBA or VSTO code, but from commandline parameters for Excel somehow? Is it possible?

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: How to set Application.Calculation = xlCalculationManual from commandline params?

    Big caveat: as I understand it...

    Calculation mode is stored as a per-workbook setting, so if you set calculation to manual all the open workbooks will be set to manual - if you then save your workbook, close it and set Excel back to automatic calculation, your workbook should open as manual calc (this is easy to test...) I learned this through many joyous hours of confusion with workbooks that one of my favourite esteemed colleagues used to send to me swtiched to manual calculation.

    An alternative would be to set calculation to manual on the open event of the particular workbook - this may be more robust.

    Having made these suggestions, I would never recommend manual calculation and would suggest there may be other ways of performing your calculations that are less-memory intensive, so you don't need to use it.

    HTH
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1