Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default how to determine calculation setting?

Is there a way to determine the calculation setting of Excel from within a
macro?

I write a lot of macros that turn off calculation so they'll run faster,
then turn it back on at the end.

Now I'm dealing with workbooks where automatic calculation is already turned
off, and for those I don't WANT it turned on at the end.

Is there a way to tell what the setting is so that I can set it back the way
it was when the macro's done?
  #2   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default how to determine calculation setting?

save the calculation setting before changing it to manual, then set it back
to the original setting at the end.

Sub test()
Dim lngCalc As Long

lngCalc = Application.Calculation
Application.Calculation = xlCalculationManual

'your code here

Application.Calculation = lngCalc
End Sub


"GoBobbyGo" wrote:

Is there a way to determine the calculation setting of Excel from within a
macro?

I write a lot of macros that turn off calculation so they'll run faster,
then turn it back on at the end.

Now I'm dealing with workbooks where automatic calculation is already turned
off, and for those I don't WANT it turned on at the end.

Is there a way to tell what the setting is so that I can set it back the way
it was when the macro's done?

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
Open CSV causes calculation in manual calc mode [email protected] Excel Discussion (Misc queries) 0 July 25th 06 09:22 PM
Setting Manual Calculation on Specific Cells Only Jim Hagan Excel Discussion (Misc queries) 3 February 23rd 06 08:09 PM
Calculation Setting in Excel Stuart Bisset Excel Discussion (Misc queries) 0 June 17th 05 09:54 AM
Auto Calculation Setting Chance224 Excel Discussion (Misc queries) 2 June 6th 05 04:04 PM
Calculation to determine days between two dates Dubleaa Excel Worksheet Functions 3 March 17th 05 03:27 AM


All times are GMT +1. The time now is 11:16 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"