Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - set calc off
Some of my macros seem to be slowed down by having to calculate after each
operation and this is not necessary. So, initially, I want to disable calc and do it only once at the end. What is the best macro command for this? Thanks, Grace |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - set calc off
Grace,
At the beginning of the procedure, use Application.Calculation = xlCalculationManual At the end of the procedure, use Application.Calculation = xlCalculationAutomatic -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Grace" wrote in message ... Some of my macros seem to be slowed down by having to calculate after each operation and this is not necessary. So, initially, I want to disable calc and do it only once at the end. What is the best macro command for this? Thanks, Grace |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - set calc off
Grace, one way to get the required statements is just to record a macro of
the action. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Grace" wrote in message ... Some of my macros seem to be slowed down by having to calculate after each operation and this is not necessary. So, initially, I want to disable calc and do it only once at the end. What is the best macro command for this? Thanks, Grace |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - set calc off
Hey Bob,
I do know this. In fact, this is how I create most of my code! In this case, I got With Application .Calculation = xlManual .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False is this the same thing as the one-liner Chip just advised? The one thing that is really confusing me is trying to record relative references. I know how to set it, now, but it still doesn't seem to work as I would hope, even with that option selected. For example, let's say I select a block of cells but want to expand it by six columns to the right. When I record, it shows me something like f16 going to L16, but this does not work the next time, when my block is not ending in cell f16. Can I get it to record this kind of thing? By the way, someone kindly tell me what the VB command is for expanding a selected range by six columns to the right, in case the recording doesn't work. Thanks, Grace "Bob Flanagan" wrote in message ... Grace, one way to get the required statements is just to record a macro of the action. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Grace" wrote in message ... Some of my macros seem to be slowed down by having to calculate after each operation and this is not necessary. So, initially, I want to disable calc and do it only once at the end. What is the best macro command for this? Thanks, Grace |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - set calc off
set rng = selection.Resize(,6)
-- Regards, Tom Ogilvy "Grace" wrote in message ... Hey Bob, I do know this. In fact, this is how I create most of my code! In this case, I got With Application .Calculation = xlManual .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False is this the same thing as the one-liner Chip just advised? The one thing that is really confusing me is trying to record relative references. I know how to set it, now, but it still doesn't seem to work as I would hope, even with that option selected. For example, let's say I select a block of cells but want to expand it by six columns to the right. When I record, it shows me something like f16 going to L16, but this does not work the next time, when my block is not ending in cell f16. Can I get it to record this kind of thing? By the way, someone kindly tell me what the VB command is for expanding a selected range by six columns to the right, in case the recording doesn't work. Thanks, Grace "Bob Flanagan" wrote in message ... Grace, one way to get the required statements is just to record a macro of the action. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Grace" wrote in message ... Some of my macros seem to be slowed down by having to calculate after each operation and this is not necessary. So, initially, I want to disable calc and do it only once at the end. What is the best macro command for this? Thanks, Grace |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro - set calc off
Thanks!
Grace "Tom Ogilvy" wrote in message ... set rng = selection.Resize(,6) -- Regards, Tom Ogilvy "Grace" wrote in message ... Hey Bob, I do know this. In fact, this is how I create most of my code! In this case, I got With Application .Calculation = xlManual .MaxChange = 0.001 End With ActiveWorkbook.PrecisionAsDisplayed = False is this the same thing as the one-liner Chip just advised? The one thing that is really confusing me is trying to record relative references. I know how to set it, now, but it still doesn't seem to work as I would hope, even with that option selected. For example, let's say I select a block of cells but want to expand it by six columns to the right. When I record, it shows me something like f16 going to L16, but this does not work the next time, when my block is not ending in cell f16. Can I get it to record this kind of thing? By the way, someone kindly tell me what the VB command is for expanding a selected range by six columns to the right, in case the recording doesn't work. Thanks, Grace "Bob Flanagan" wrote in message ... Grace, one way to get the required statements is just to record a macro of the action. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Grace" wrote in message ... Some of my macros seem to be slowed down by having to calculate after each operation and this is not necessary. So, initially, I want to disable calc and do it only once at the end. What is the best macro command for this? Thanks, Grace |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MACRO can I calc just one line? | Excel Discussion (Misc queries) | |||
2Q:Indirect worksheet selection in macro, Calc off for specific sh | Excel Discussion (Misc queries) | |||
auto calc on, but have to edit (f2) cells to force re-calc..help! | Excel Worksheet Functions | |||
Excel Macro - Calc to last row problem | Excel Programming | |||
Macro to calc an intersection | Excel Programming |