Solved

Destroying a Collection of UserForms

Posted on 2007-03-19
2
216 Views
Last Modified: 2010-04-30
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?

Mike
0
Comment
Question by:shacho
2 Comments
 
LVL 8

Accepted Solution

by:
KelvinY earned 500 total points
Comment Utility
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.
0
 

Author Comment

by:shacho
Comment Utility
Thanks for the info!

Mike
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now