Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Turning Of Calculation

I use the following to turn off the calculation and then
back on when exiting my workbook.

Private Sub Workbook_Activate()
Application.Calculation = xlManual
Application.CalculateBeforeSave = False
End Sub

Private Sub Workbook_Deactivate()
Application.Calculation = xlAutomatic
Application.CalculateBeforeSave = True
End Sub

When I open only one workbook at a time it works fine but
when I open a second workbook with the same code it
starts to calculate also everytime I close my workbook it
asks if I want to save the changes. Is there a way to not
calculate when a second workbook is opened with the same
code and to not ask if I want to save changes unless I
have made changes?

TIA
Joe
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Turning Of Calculation

When you go from one workbook to the other, it turns calculation back on I
believe. The activate event fires before the deactivate event I believe,
but it would be easy to test.

I guess you would have to figure out how to maintain your setting within the
way you intend to use your workbooks.

--
Regards,
Tom Ogilvy

"Joe Gieder" wrote in message
...
I use the following to turn off the calculation and then
back on when exiting my workbook.

Private Sub Workbook_Activate()
Application.Calculation = xlManual
Application.CalculateBeforeSave = False
End Sub

Private Sub Workbook_Deactivate()
Application.Calculation = xlAutomatic
Application.CalculateBeforeSave = True
End Sub

When I open only one workbook at a time it works fine but
when I open a second workbook with the same code it
starts to calculate also everytime I close my workbook it
asks if I want to save the changes. Is there a way to not
calculate when a second workbook is opened with the same
code and to not ask if I want to save changes unless I
have made changes?

TIA
Joe



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
Turning =E13 to =$E$13 Bishop Excel Worksheet Functions 3 February 4th 10 06:58 PM
keeps turning off rio Excel Worksheet Functions 4 August 31st 07 02:08 AM
Turning off and keeping off auto calculation Peter Excel Discussion (Misc queries) 5 February 7th 07 03:35 PM
Turning 0.000 values red bz Excel Worksheet Functions 2 April 1st 06 12:49 PM
Turning #N/A to a zero...?? bigtim Excel Discussion (Misc queries) 5 July 26th 05 08:48 PM


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