Excel Sluggish After Macro

dgr

Board Regular
Joined
Apr 24, 2005
Messages
176
Hi,
I'm using Excel 2013, Windows 8. I'm running approximately 100 macros sequentially using the main macro below. The total processing time of all my macros is approximately 8 minutes. The file size of my .xlsm file where I store my macros is less than 3 MB.

My problem is Excel becomes very sluggish AFTER running all these macros. Therefore, I have to close the workbook & reboot my laptop in order for things to return to normal. All other applications such as Google Chrome, Ms Word are not affected.

Is there any way in VBA to 'release' the memory or some other process to get Excel to run normally after the macros stop running? It's not practical for me to check every single macro for memory leaking code as I am not well versed with VBA myself. Therefore, I was thinking that if there was some VBA code that i can insert in my final macro to 'release' the memory, that would be good.

Thanks for your help.
Code:
sub mainmacro()
Application.ScreenUpdating = False
Application.DisplayStatusBar = False

macro1
macro2
macro3

Application.DisplayStatusBar = True
Application.ScreenUpdating = True

End Sub
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,774
Members
413,934
Latest member
austinb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top