ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application Calculation Error (https://www.excelbanter.com/excel-programming/283565-application-calculation-error.html)

Rick B[_4_]

Application Calculation Error
 
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

Tom Ogilvy

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

--
Regards,
Tom Ogilvy


"Rick B" wrote in message
...
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




Rick B[_4_]

Application Calculation Error
 
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


"Rick B" wrote in

message
...
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



.



All times are GMT +1. The time now is 10:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com