ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sometimes range calculate doesn't work in macro. Why? (https://www.excelbanter.com/excel-programming/317336-sometimes-range-calculate-doesnt-work-macro-why.html)

Don Wiss

Sometimes range calculate doesn't work in macro. Why?
 
I have applications in active use in my company that under macro control
just calculate a single cell, or a range. I figure that I don't need to
calculate the entire workbook when I don't need to. Usually this works
fine. Every once in a while it doesn't. Once a workbook gets into such a
state the only solution is to delete the range and do a calculate on the
entire workbook. The one I saw today, and which motivated me to post, there
was no other workbook open. Have others seen this? Any idea why?

We are using xl2002.

Don <donwiss at panix.com.

Charles Williams

Sometimes range calculate doesn't work in macro. Why?
 
Hi Don,

There are several known limitations of Range.calculate with Excel 2002.

Maybe you have hit one of them: see
http://www.DecisionModels.com/calcsecretsg.htm


Charles
______________________
Decision Models
FastExcel 2.1 now available
www.DecisionModels.com

"Don Wiss" wrote in message
...
I have applications in active use in my company that under macro control
just calculate a single cell, or a range. I figure that I don't need to
calculate the entire workbook when I don't need to. Usually this works
fine. Every once in a while it doesn't. Once a workbook gets into such a
state the only solution is to delete the range and do a calculate on the
entire workbook. The one I saw today, and which motivated me to post,
there
was no other workbook open. Have others seen this? Any idea why?

We are using xl2002.

Don <donwiss at panix.com.




gary franc

Sometimes range calculate doesn't work in macro. Why?
 
I have many VBA macros that do the same range calculation. I have found that
in EXCEL versions 2000 and lower the macros work fine. In versions 2002 and
higher, the range calculation code generates a error code 1004 if calculation
is set to manual and if iterations are set.

As long as the range you need to calculate does not contain circular
references then you can fix the problem by turning off iterations.

"Don Wiss" wrote:

I have applications in active use in my company that under macro control
just calculate a single cell, or a range. I figure that I don't need to
calculate the entire workbook when I don't need to. Usually this works
fine. Every once in a while it doesn't. Once a workbook gets into such a
state the only solution is to delete the range and do a calculate on the
entire workbook. The one I saw today, and which motivated me to post, there
was no other workbook open. Have others seen this? Any idea why?

We are using xl2002.

Don <donwiss at panix.com.


G Franc

Sometimes range calculate doesn't work in macro. Why?
 
I have many VBA macros that do the same range calculation. I have found that
in EXCEL versions 2000 and lower the macros work fine. In versions 2002 and
higher, the range calculation code generates a error code 1004 if calculation
is set to manual and if iterations are set.

As long as the range you need to calculate does not contain circular
references then you can fix the problem by turning off iterations.

"Don Wiss" wrote:

I have applications in active use in my company that under macro control
just calculate a single cell, or a range. I figure that I don't need to
calculate the entire workbook when I don't need to. Usually this works
fine. Every once in a while it doesn't. Once a workbook gets into such a
state the only solution is to delete the range and do a calculate on the
entire workbook. The one I saw today, and which motivated me to post, there
was no other workbook open. Have others seen this? Any idea why?

We are using xl2002.

Don <donwiss at panix.com.



All times are GMT +1. The time now is 10:39 PM.

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