Disabling Excel automatic calculation
(Originally posted by James Katerberg on 11/4/2005)
In an ImagePro macro, I open an Excel workbook template into which data is placed. The workbook contains a large number of equations. I would like to turn off automatic calculation before opening the workbook as it can take a up to a minute before all the calculations are complete. Currently I am opening the Excel workbook using the following commands
Set oExcel = CreateObject ("Excel.Application") ' Create Excel application object
Set xlWorkbook = oExcel.Workbooks.Open (xlPath)
I have tried the following
Set oExcel = CreateObject ("Excel.Application") ' Create Excel application object
oExcel.calculation=x1manual
Set xlWorkbook = oExcel.Workbooks.Open (xlPath)
but I get the error message saying "Expecting an Existing scalar var.
I have tried the following
Set oExcel = CreateObject ("Excel.Application") ' Create Excel application object
oExcel.calculation="x1manual"
Set xlWorkbook = oExcel.Workbooks.Open (xlPath)
but I get the error message saying "(&H800a03ec) Unable to set the Calculation property of the Application Class"
How do I turn off the automatic calculation and later turn it back on from within an ImagePro macro?
Comments
-
(Originally posted by Chris Tully on 11/18/2005)
oExcel.calculation=xlmanual
Should also work. Notice xl versus x1.
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions