Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default calc mode question

i have this code that loops as it build a formula

Application.Calculation = xlCalculationManual

for i = 1 to 10
Range("B4").Formula = Range("B4").Formula & "+'" & fPath & FileName$(i) &
"Trans'!$F4"
Range("C4").Formula = Range("C4").Formula & "+'" & fPath & FileName$(i) &
"Hours'!$F4"
next i

if i turn on screen updating, i can see each cell being calculated as it
builds the formula.

any way to turn of calculations so the cells aren't updated as they're
built?


--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 968
Default calc mode question

build the formulae as strings and then put them into the cells using
..formula

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

"Gary Keramidas" wrote in message
...
i have this code that loops as it build a formula

Application.Calculation = xlCalculationManual

for i = 1 to 10
Range("B4").Formula = Range("B4").Formula & "+'" & fPath & FileName$(i) &
"Trans'!$F4"
Range("C4").Formula = Range("C4").Formula & "+'" & fPath & FileName$(i) &
"Hours'!$F4"
next i

if i turn on screen updating, i can see each cell being calculated as it
builds the formula.

any way to turn of calculations so the cells aren't updated as they're
built?


--


Gary





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default calc mode question

Application.ScreenUpdating = False

<vba code

Application.ScreenUpdating = True 'Don't forget to put it on!!!

--
Ronald Ferdinandus
http://www.ro-pay.nl


"Gary Keramidas" wrote:

i have this code that loops as it build a formula

Application.Calculation = xlCalculationManual

for i = 1 to 10
Range("B4").Formula = Range("B4").Formula & "+'" & fPath & FileName$(i) &
"Trans'!$F4"
Range("C4").Formula = Range("C4").Formula & "+'" & fPath & FileName$(i) &
"Hours'!$F4"
next i

if i turn on screen updating, i can see each cell being calculated as it
builds the formula.

any way to turn of calculations so the cells aren't updated as they're
built?


--


Gary




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default calc mode question

thanks, doing that cuts it from 30 some seconds to about 6 seconds. i
haven't tried it on the clients slow machine yet, but it took over 3 minutes
the original way.

thanks again

--


Gary


"Charles Williams" wrote in message
...
build the formulae as strings and then put them into the cells using
.formula

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

"Gary Keramidas" wrote in message
...
i have this code that loops as it build a formula

Application.Calculation = xlCalculationManual

for i = 1 to 10
Range("B4").Formula = Range("B4").Formula & "+'" & fPath & FileName$(i) &
"Trans'!$F4"
Range("C4").Formula = Range("C4").Formula & "+'" & fPath & FileName$(i) &
"Hours'!$F4"
next i

if i turn on screen updating, i can see each cell being calculated as it
builds the formula.

any way to turn of calculations so the cells aren't updated as they're
built?


--


Gary







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default calc mode question

just ran it on my client's pc, took 30 seconds instead of 3 and a half
minutes.

thanks again

--


Gary


"Charles Williams" wrote in message
...
build the formulae as strings and then put them into the cells using
.formula

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

"Gary Keramidas" wrote in message
...
i have this code that loops as it build a formula

Application.Calculation = xlCalculationManual

for i = 1 to 10
Range("B4").Formula = Range("B4").Formula & "+'" & fPath & FileName$(i) &
"Trans'!$F4"
Range("C4").Formula = Range("C4").Formula & "+'" & fPath & FileName$(i) &
"Hours'!$F4"
next i

if i turn on screen updating, i can see each cell being calculated as it
builds the formula.

any way to turn of calculations so the cells aren't updated as they're
built?


--


Gary









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 364
Default calc mode question

had that, just turned it off to see the calcs

--


Gary


"RonaldF" wrote in message
...
Application.ScreenUpdating = False

<vba code

Application.ScreenUpdating = True 'Don't forget to put it on!!!

--
Ronald Ferdinandus
http://www.ro-pay.nl


"Gary Keramidas" wrote:

i have this code that loops as it build a formula

Application.Calculation = xlCalculationManual

for i = 1 to 10
Range("B4").Formula = Range("B4").Formula & "+'" & fPath & FileName$(i) &
"Trans'!$F4"
Range("C4").Formula = Range("C4").Formula & "+'" & fPath & FileName$(i) &
"Hours'!$F4"
next i

if i turn on screen updating, i can see each cell being calculated as it
builds the formula.

any way to turn of calculations so the cells aren't updated as they're
built?


--


Gary






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
MODE calc where more than one mode number! Struggling in Sheffield[_2_] New Users to Excel 2 October 15th 09 04:52 PM
SUMPRODUCT calc question PerryClisbee Excel Worksheet Functions 1 August 5th 06 12:00 AM
Open CSV causes calculation in manual calc mode [email protected] Excel Discussion (Misc queries) 0 July 25th 06 09:22 PM
Calc mode display on worksheet Robert Excel Worksheet Functions 7 January 6th 06 03:29 PM
Re-calc. speed question GerryK Excel Worksheet Functions 0 April 7th 05 05:06 PM


All times are GMT +1. The time now is 05:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"