Destroying a Collection of UserForms

If I set a collection of userforms = to Nothing, are the forms it contains automatically unloaded and removed from memory, or should I unload them one by one before I destroy the collection?

Who is Participating?
KelvinYConnect With a Mentor Commented:
VBA does not manage memory the way that .NET does, so you are responsible for destroying the objects that you create. You should unload the forms first and then destroy the collection. If you don't then they will hang around consuming until the application ends.
shachoAuthor Commented:
Thanks for the info!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.