Error when using command button to turn off auto calculation
Posted by Joe on December 01, 2000 10:04 AM
I'm trying to run code using a command button on a worksheet. I want to turn off automatic calculation at the beginning of the procedure. When I run the procedure with the command button, I get a run-time error '1004': "Method 'Calculation' of Object '_Application' failed." However, when I run the code without using the command button, it works fine. Here's my code, which is in the sheet object:
Private Sub CommandButton2_Click()
Application.Calculation = xlCalculationManual
.
.(Statements)
.
End Sub
Any ideas? Thanks in advance.
Joe