Hello
Small question for my personal culture,
What is the point of ending or not finishing a macro with:
Set swApp = Rien
Set swModel = Rien
Set swDraw = Rien
Set swRefModel = Rien
End Sub
It sometimes happens that a macro launched several hours before by a colleague is considered open by him (and therefore read-only), could this solve the problem of emptying everything before closing the macro or does it not necessarily have a great interest?
Hello
It allows you to empty the memory of the objects used in the macro (when you need to restart it for example to do another processing). Among other things, it avoids having processes that remain active after the end of the macro (if you launch Excel from SW for example, it avoids having instances that remain open).
2 Likes
That's what it seemed to me, but it's true that it's rarely used in macros that you find everywhere.
Before closing the subject, do you have any objects other than Excel that you recommend @Cyril.f to empty systematically?
1 Like
SwApp at least after @d.roger probably has more knowledge about this
1 Like