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
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,839
Messages
6,121,891
Members
449,058
Latest member
Guy Boot

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
Back
Top