+ Reply to Thread
Results 1 to 8 of 8

Turn on off calculation to a specific workbook

  1. #1
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Turn on off calculation to a specific workbook

    I have several workbooks open. I'm trying to apply to only a specific workbook Manual Calculation, do my thing, and then turn back on Auto Calculation.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Turn on off calculation to a specific workbook


    Use in specific workbook ThisWorkbook module VBA event procedures Activate & Deactivate

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,224

    Re: Turn on off calculation to a specific workbook

    Just from the code itself:
    Please Login or Register  to view this content.
    You can see that the Calculation property works at the application level, that is, you will disable or enable recalculation in all open workbooks. The code template you presented is the most commonly used. You disable the recalculation before executing some actions with code, and turn it on at the end.
    If you can't use such a code structure, then describe in more detail what your problem is.

    Artik

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2011
    Location
    usa
    MS-Off Ver
    Excel 2007, Excel 365
    Posts
    495

    Re: Turn on off calculation to a specific workbook

    @JyothiGrace are you wanting to turn the calculation off for all the sheets in that one workbook, or just certain sheets in that workbook?

    Forgot to ask, do you want the sheet(s) calculation turned off when that workbook is opened?
    Last edited by johnnyL; 10-08-2023 at 09:39 PM.

  5. #5
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Turn on off calculation to a specific workbook

    I would like to:

    1. Open specific workbook
    2. Turn on manual calculation to the entire workbook
    3. Run other codes
    4. Change to auto calculation

    I just want to apply this code to one specific workbook rather than all opened workbooks.

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2011
    Location
    usa
    MS-Off Ver
    Excel 2007, Excel 365
    Posts
    495

    Re: Turn on off calculation to a specific workbook

    Ok, it sounds like you want to disable Auto calculation for all sheets in a particular workbook.

    In that particular workbook, copy the following code to the 'ThisWorkbook' module in that workbook:
    Please Login or Register  to view this content.
    Then, in a regular module in that particular workbook, copy the following code:
    Please Login or Register  to view this content.
    Save the workbook, close & reopen it & let us know how it goes.

    Edit: Forgot to mention, you would run the last code when you want the sheets to calculate one time, run it each time you want the sheets to be recalculated.
    Last edited by johnnyL; 10-08-2023 at 11:37 PM. Reason: Forgot to say what the second code does

  7. #7
    Forum Contributor
    Join Date
    01-25-2021
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    144

    Re: Turn on off calculation to a specific workbook

    That's what I needed......thanks johnny!

  8. #8
    Valued Forum Contributor
    Join Date
    11-27-2011
    Location
    usa
    MS-Off Ver
    Excel 2007, Excel 365
    Posts
    495

    Re: Turn on off calculation to a specific workbook

    Glad to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA - turn on auto calculation AFTER Workbook is closed
    By deanblew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2019, 12:37 PM
  2. Replies: 9
    Last Post: 02-16-2019, 05:44 PM
  3. Enabling manual calculation on one specific workbook but all other open worbooks remain on
    By teo.paranoid in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-25-2014, 06:39 AM
  4. [SOLVED] Turned Off Calculation; Cannot Turn Calculation It Back On Again
    By snapfade in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2014, 05:28 PM
  5. Calculation options for a specific workbook
    By billiboy in forum Excel General
    Replies: 2
    Last Post: 08-02-2011, 08:15 AM
  6. Replies: 3
    Last Post: 10-27-2008, 08:50 AM
  7. protection of a workbook + unprotecting specific cells + calculation auto
    By choubix in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2008, 07:49 AM

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