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.
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.
Use in specific workbook ThisWorkbook module VBA event procedures Activate & Deactivate
Just from the code itself: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.Please Login or Register to view this content.
If you can't use such a code structure, then describe in more detail what your problem is.
Artik
@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.
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.
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:
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.Please Login or Register to view this content.
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
That's what I needed......thanks johnny!
Glad to help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks