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.
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