Hi,
I have an issue that's doing my head in, can anyone help??!!
I've got a large workbook in Excel 2010 that has about 50 worksheets, 100 macros and is about 80MB in size. There are lots of formulas, change events and macros that all run in a strict chronological order to feed lots of metrics and graphics. I press a button which calls the macros in a sequential order and populates the whole workbook at great speed (usually in about 45secs). However it now runs slow (5mins). Through a long process of elimination I have found the problem but not a solution.
There are two worksheets which when deleted from the workbook solve the issue and the macros fly again, however I need to retain the worksheets in the workbook. On scouring the worksheets there appears to be nothing untoward within them - they are not reading 'live' from a source that is being updated by the other macros etc.
Is there a way of completely isolating these two worksheets when the macros are running or by making them temporarily invisible/non-active??
I have tried the following code in each sheet but it has no effect:
Any help massively appreciated!!
Thanks,
I have an issue that's doing my head in, can anyone help??!!
I've got a large workbook in Excel 2010 that has about 50 worksheets, 100 macros and is about 80MB in size. There are lots of formulas, change events and macros that all run in a strict chronological order to feed lots of metrics and graphics. I press a button which calls the macros in a sequential order and populates the whole workbook at great speed (usually in about 45secs). However it now runs slow (5mins). Through a long process of elimination I have found the problem but not a solution.
There are two worksheets which when deleted from the workbook solve the issue and the macros fly again, however I need to retain the worksheets in the workbook. On scouring the worksheets there appears to be nothing untoward within them - they are not reading 'live' from a source that is being updated by the other macros etc.
Is there a way of completely isolating these two worksheets when the macros are running or by making them temporarily invisible/non-active??
I have tried the following code in each sheet but it has no effect:
Code:
Option Explicit
Private Sub Worksheet_Activate()
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Deactivate()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
End Sub
Thanks,
Last edited by a moderator: