ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Before workbook close (https://www.excelbanter.com/excel-programming/337500-before-workbook-close.html)

ceemo[_9_]

Before workbook close
 

I would like to set up my workbook to change to manual calculation o
workbook open and switch back to auto calculation before workboo
close

--
ceem
-----------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065
View this thread: http://www.excelforum.com/showthread.php?threadid=39640


Jean-Yves[_2_]

Before workbook close
 
Hi.
on open
Application.Calculation = xlCalculationManual
on close
Application.Calculation = xlCalculationAutomatic
Regards
JY
"ceemo" wrote in
message ...

I would like to set up my workbook to change to manual calculation on
workbook open and switch back to auto calculation before workbook
close.


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:

http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=396408




Bob Phillips[_6_]

Before workbook close
 
Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Calculation = xlCalculationAutomatic
End Sub

Private Sub Workbook_Open()
Application.Calculation = xlCalculationManual
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)


"ceemo" wrote in
message ...

I would like to set up my workbook to change to manual calculation on
workbook open and switch back to auto calculation before workbook
close.


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:

http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=396408





All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com