VBA code to enable-diable calculations for hidden sheets

nhayden73

New Member
Joined
Jan 10, 2018
Messages
8
Hello,

I am working on a large workbook with 32 tabs (roughly 1M file). About 22 of the tabs are not used on a regular basis but they all contain a number of calculations, references and Index/Match with the primary sheets. All of this being active causes the workbook to slow down. I am looking for some VBA code that would enable/disable calculations on sheets based on their active/hidden state.

Any suggestions would be greatly appreciated.

Also all of these sheets are currently running a VBA code that renames the sheet tab based on cell values so I want to make sure that the added code does not effect this when active.

Thank you in advance for any assistance.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
What about switching the calculations between manual and automatic based on the sheet being active or hidden?
 
Upvote 0
Well you could do that. I don't think I ever have calculations turned off except for when running macros. It can cause errors if you don't realise. Its all too easy to forget the workbook isn't calculating.
 
Upvote 0
See Help for Worksheet.EnableCalculation Property
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top