Prevent Calculation On Open

u742884

Board Regular
Joined
Jun 23, 2002
Messages
126
Is there a way to prevent a file from calculating when you open it?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
*not tested*

I would try putting
Code:
Private Sub Workbook_Open()
    Application.Calculation = xlCalculationManual
End Sub
in the workbook's code module.
 
Upvote 0
I already have:

Sub auto_open()
With Application
.Calculation = xlManual
.CalculateBeforeSave = True
End With
[Some other stuff]

End Sub()

The [other stuff] is occurring and the calculation mode is changed to manual, but it still calc's the file upon opening.
 
Upvote 0
Oaktree,

I saw your post after submitting mine. I read through the notes you referred to. I do not want to change any of their default settings so the which of these is correct:

:biggrin: I can write code to close all open files, and regardless of which calc mode they were in, my file will open, read my code to make calc manual and not calc until I make it do so. This would be perfect world.

:) I can direct the users to close all open files, regardless of which calc mode they were in, my file will open, read my code to make calc manual and not calc until I make it do so.

:( I have to direct the users to change calc mode before opening this file.
 
Upvote 0
The second one is right. If no workbooks are open (*including the default Book1) and your file was saved with calculation set to manual, your file will open with calculation set to manual. You shouldn't even need that line of code in your macro at all.

(The first one is incorrect because the workbook would calculate first, then fire the workbook_open macro you'd set up to close the other workbooks)
 
Upvote 0

Forum statistics

Threads
1,214,639
Messages
6,120,679
Members
448,977
Latest member
dbonilla0331

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