Application Calculation Error

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
 
T

Tom Ogilvy

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

Rick B

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





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top