Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent automatic calculation for workbook being opened
Dear Colleagues,
Please advise with the subject, details are below. I am getting exported data to excel and this data is in text format which I am processing to get the values. The macro to process it is located inside of add-in and it intercepts Application.WorkBookOpen Event. The point is that excel is calculating twice, before my macro runs and after. How I can prevent excel from double work? I have workbooks with a lot of heavy formulas and to calculate all of them take a time. Below is my code: Private Sub App_WorkbookOpen(ByVal wb As Workbook) 'Speed up the process Application.Interactive = False Application.DisplayAlerts = False Application.ScreenUpdating = False Application.Calculation = xlCalculationManual 'Exit from Sub when no workbooks opened If Application.Workbooks.Count < 1 Then Exit Sub End If 'Perform report manipulations here Call ctApplyFormatting() Call ctConvertToValues() 'Restoring Application default behaviour Application.Interactive = True Application.DisplayAlerts = True Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic End Sub Thank you in advance. BR, Sergiy |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculation - set to automatic for one workbook - manual for anoth | Excel Discussion (Misc queries) | |||
The Workbook you opened contains automatic links | Excel Programming | |||
Opening Workbook resets calculation to automatic from manual etc | Excel Discussion (Misc queries) | |||
Howto prevent automatic calculation when open a CSV file | Excel Programming | |||
Prevent the Macros to be opened in 2nd xls. Sheet | Excel Programming |