Hi,
I have excel workbook with 3 user forms. Usually forms work as they should but if I leave the workbook open and then try to open form I get the error: Out of memory run-time error 7. Does anybody have any hint how can I avoid this memory lack?
Could be that you are not resetting your variables. Especially if you have object or Variant type variables which are not set to Nothing, memory can be eaten away
eg
Dim ws as worksheet
set ws = worksheets(1)
'do stuff
'do stuff
If you stop here, excel doesn't reallocate the memory saved for the ws variable. To clear this, use
set ws = nothing
after you have finished using the variable
Rgds, Geoff [blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.