tags:

views:

427

answers:

2

I'm trying to automate some stuff in MS Excel. When I try to set the Calculation property I get the following error message: 'Unable to set the Calculation property of the Application class'

I believe this property should be settable.

Any advice appreciated!

+1  A: 

Make sure you are setting it to a proper value.

 Application.Calculation = xlCalculationManual

or one of the following values:

xlCalculationAutomatic: Excel controls recalculation.
xlCalculationManual: Calculation is done when the user requests it.
xlCalculationSemiautomatic: Excel controls recalculation but ignores changes in tables.

BradC
+1  A: 

Googling produces this suggestion:

You need to have a open workbook, ie

xl.Workbooks.Add
xl.Calculation = xlCalculationManual
dbb