Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Toggling on/off auto calc

How can I toggle on and off the automatic calculations in VBA code? I have a
code that imports data from another file but when I run this code I want to
be able to shut off the auto-calc until the import is done. How would I do
this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Toggling on/off auto calc

Try recording a macro as you perform the action manually. That's a good way
to start learning the Excel object model.

--
Jim
"Secret Squirrel" wrote in
message ...
| How can I toggle on and off the automatic calculations in VBA code? I have
a
| code that imports data from another file but when I run this code I want
to
| be able to shut off the auto-calc until the import is done. How would I do
| this?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Toggling on/off auto calc

Sub todostuff()

Application.Calculation = xlManual
your code here
Application.Calculation = xlAutomatic

End Sub

On Tue, 20 May 2008 07:20:01 -0700, Secret Squirrel
wrote:

How can I toggle on and off the automatic calculations in VBA code? I have a
code that imports data from another file but when I run this code I want to
be able to shut off the auto-calc until the import is done. How would I do
this?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Toggling on/off auto calc

Thanks! That works for me!

"Jim Rech" wrote:

Try recording a macro as you perform the action manually. That's a good way
to start learning the Excel object model.

--
Jim
"Secret Squirrel" wrote in
message ...
| How can I toggle on and off the automatic calculations in VBA code? I have
a
| code that imports data from another file but when I run this code I want
to
| be able to shut off the auto-calc until the import is done. How would I do
| this?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,718
Default Toggling on/off auto calc

If you give a man a fish you feed him for one day. If you teach him to fish
you feed him for a lifetime.

--
Jim
"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
| Sub todostuff()
|
| Application.Calculation = xlManual
| your code here
| Application.Calculation = xlAutomatic
|
| End Sub
|
| On Tue, 20 May 2008 07:20:01 -0700, Secret Squirrel
| wrote:
|
| How can I toggle on and off the automatic calculations in VBA code? I
have a
| code that imports data from another file but when I run this code I want
to
| be able to shut off the auto-calc until the import is done. How would I
do
| this?
|




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Toggling on/off auto calc

Along with Excel help we are now dispensing homilies?<g

But......point taken Jim


Gord

On Tue, 20 May 2008 11:45:07 -0400, "Jim Rech" wrote:

If you give a man a fish you feed him for one day. If you teach him to fish
you feed him for a lifetime.


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
Formulas Won't Auto Calc Mike The Newb Excel Discussion (Misc queries) 1 October 17th 06 04:28 PM
Auto calc Jkalsch New Users to Excel 2 May 15th 06 03:27 PM
Auto Calc ScottS Excel Discussion (Misc queries) 0 February 27th 06 06:29 PM
auto calc on, but have to edit (f2) cells to force re-calc..help! Curt Excel Worksheet Functions 3 February 13th 06 06:05 PM
Auto Calc not working littlejon20 Excel Worksheet Functions 0 March 30th 05 07:54 PM


All times are GMT +1. The time now is 05:42 PM.

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

About Us

"It's about Microsoft Excel"