Application Calculation Error

  • Thread starter Thread starter Rick B
  • Start date Start date
R

Rick B

I keep getting an error when changing the
application.calculation property.

The code is as follows:
If Application.Calculation = xlCalculationAutomatic Then
Application.Calculation = xlCalculationManual
End If

I get a 1004 runtime error:

Method 'Calculation' of Object '_Application' failed.

It worked once, then it starts giving me the error.
Anyone have a clue what causes this?
Thanks
 
Just a guess, but if you are running this from a commandbutton in Excel 97,
change the takefocusonclick property to false.
 
Thanks a Million! That was the problem.

-----Original Message-----
Just a guess, but if you are running this from a commandbutton in Excel 97,
change the takefocusonclick property to false.

--
Regards,
Tom Ogilvy





.
 
Back
Top