Error in code re: automatic calculation

Humate

New Member
Joined
Feb 13, 2006
Messages
43
HI All,

I have some code that is giving me the an error message. To speed up my macro I have this at the start

Code:
 With Application
            .ScreenUpdating = False
            .EnableEvents = False
            .Calculation = xlCalculationManual
 End With

Some more code here to copy and manipulate data. followed by this:

Code:
With Application
                .DisplayFormulaBar = False
                .DisplayStatusBar = False
                .ScreenUpdating = True
                .EnableEvents = True
                .CalculationVersion = xlAutomatic
End With

I get a compile error message on the final line when asking to revert to automatic calculation, "Can't assign to read only propery". I'm not sure what I am doing wrong, can anyone help?

Thanks
Humate
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Excellent, can't believe I hadn't spotted that!

The macro runs fine now, no errors. The only problem is that it doesn't seem to change back to automatic calculation, despite going through the code fine.

Any ideas why it is doing this? I am using xl2000.

Thanks again
Humate
 
Upvote 0

Forum statistics

Threads
1,214,413
Messages
6,119,374
Members
448,888
Latest member
Arle8907

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