Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Manual calculation to Automatic on close - BUT without recalculati

I've a large excel doc (which is about to become a even bigger)

It uses Sumproduct & has loads of lookups.

As such when I open one of my macros changes excel to "manual calculation".
I have "Calculate" & "Update" buttons for users to press to update each sheet.
(note: excel is unable to update the workbook)

I need a macro to change the users settings back to Automatic upon closing
the file.

However it has to be done so that excel DOSEN'T try to re-calculate the
entire wookbook (which it can't do) before closing.

I've looked through the forums & googled intensively. (nothing worse than a
repeat post!)
But I do appologise if this has been answered before.

If its not do-able I'll have to just have a pop-up msgbox.

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Manual calculation to Automatic on close - BUT without recalculati

You could use the close event to schedule a macro from your Personal.xls to set the calc mode to
auto. Just set it some time in the future, long enough to let the book actually close.

In your workbook (5 second delay):

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime Now + TimeValue("00:00:05"), "Personal.xls!ResetCalcs"
End Sub

In your Personal.xls file:

Sub ResetCalcs()
Application.Calculation = xlCalculationAutomatic
End Sub

HTH,
Bernie
MS Excel MVP


"Carlos" wrote in message
...
I've a large excel doc (which is about to become a even bigger)

It uses Sumproduct & has loads of lookups.

As such when I open one of my macros changes excel to "manual calculation".
I have "Calculate" & "Update" buttons for users to press to update each sheet.
(note: excel is unable to update the workbook)

I need a macro to change the users settings back to Automatic upon closing
the file.

However it has to be done so that excel DOSEN'T try to re-calculate the
entire wookbook (which it can't do) before closing.

I've looked through the forums & googled intensively. (nothing worse than a
repeat post!)
But I do appologise if this has been answered before.

If its not do-able I'll have to just have a pop-up msgbox.

Thanks in advance



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
Automatic/Manual Calculation Scott D Excel Discussion (Misc queries) 1 May 19th 09 05:36 PM
Calculation Manual vs Automatic TJAC Excel Discussion (Misc queries) 3 March 4th 08 10:13 PM
Calculation - Automatic and Manual shepcon Excel Discussion (Misc queries) 1 July 17th 07 05:14 PM
manual vs. automatic calculation Kaiser[_2_] Excel Programming 1 May 17th 07 11:46 AM
Manual / Automatic Calculation Ray Lau Excel Programming 2 June 29th 04 04:27 PM


All times are GMT +1. The time now is 06:54 PM.

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"