Automatically calculate formulas when workbook opens

noora19

New Member
Joined
Aug 3, 2010
Messages
41
My excel resets to the manual feature for calculating formulas everytime I close out of excel completely and I need to reset this feature each time. How do I develop a macro that automatically sets the application to 'automatic' (from manual) when I open up excel. I think the code needs to be in my "personal" VMA excel object in order to activate the event ('open') instead of a module. Is this correct? This is the code I was trying to use (but I am getting an error as soon as I open excel):

Private Sub Workbook_Open()
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
<o:p> </o:p>
If Application.Calculation = -xlCalculationManual = True Then
With Application
.Calculation = xlCalculationAutomatic
.MaxChange = 0.001
End With
<o:p></o:p>
Else
End
<o:p> </o:p>
End If
End Sub


I found some code online that was using the 'Public User Setting" in conjunction with similar codes. What is the Public User Setting used for?

Any info appreciated!

Thanks
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Remove RED characters..(They produce no benefit)..


Rich (BB code):
Private Sub Workbook_Open()

If Application.Calculation = -xlCalculationManual = True Then
With Application
.Calculation = xlCalculationAutomatic
.MaxChange = 0.001
End With

Else
End
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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