Hi Simon,
one method is to move the Application.calculation to the main module:
Application.Calculation = xlCalculationManual
frmMyForm.show
PasteVals
Application.Calculation = xlCalculationAutomatic
Charles
______________________
Decision Models
FastExcel Version 2 now available.
www.DecisionModels.com
"Simon Palmer" wrote in message
...
I set up a user form to control user inputs into a complex workbook. On
closing the form a range of inputs are pasted into the book, but because the
calculation method is set to Automatic, excel re-calculates the sheet after
each value is pasted.
When I tried to switch off automatic recalculation in code I get a
run-time error which I didn't expect. I used :
Application.Calculation = xlCalculationManual
but get the error :
Run Time Error 1004 - Method 'Calculation' of object '_Application' failed
Any suggestions as to what causes this and how I can fix it ?