Forum Discussion
Macro using too much memory
Hi Change99 ,
I'm not very familiar with VB, but if all subs and functions are in a module, wouldn't it be better to create a
Main Sub()
Call Sub ActivateSheet()
IF .......
...
Then
...
Else
...
EndIf
Call Sub dpwlöschenkopierenfiltern()
And so on and so forth?
End Sub
Don't forget to add the Exit Sub in the Sub Procedures that you call so that it won't take up too much memory...
or am i just way too out of touch in this scene?
https://excelmacromastery.com/excel-vba-sub/
Cheers
- Yea_SoMay 21, 2021Bronze Contributor
Hi Change99
Click the link I provided and it will explain it to you
basically you put the exit sub in the procedures calls you are making in the main sub, the purpose for that is so your code will not be taking up memory waiting to be excuted and free up memory so excel wont keep rotating before it stops responding.
- Change99May 21, 2021Brass ContributorThanks Ill check it out!