Can someone help me out in fully understanding the life time of Variables and Objects in VBA.
I am currently developing a project for a client, as some of the machines the application side will be deployed on are pretty old, I need to watch the memory useage.
Where possible I have stored procedures as seperate public modules and pass values from event procedures through Args call [Name]([Arg1], [Arg2]) etc.
All the variables in the Public Modules are declared Private in the sub / function not the declarations part.
I have managed to avoid the use of statics and Public Module level variables.
When a form or report is closed is the module removed from memory, likewise after a called module has finished running? If not is there a way that to Explicitly destroy all variables and objects, releasing memory, after the procedure has finished running?
Any general tips on minimising memory usage would also be very handy
Thanks in advance
Jon
I am currently developing a project for a client, as some of the machines the application side will be deployed on are pretty old, I need to watch the memory useage.
Where possible I have stored procedures as seperate public modules and pass values from event procedures through Args call [Name]([Arg1], [Arg2]) etc.
All the variables in the Public Modules are declared Private in the sub / function not the declarations part.
I have managed to avoid the use of statics and Public Module level variables.
When a form or report is closed is the module removed from memory, likewise after a called module has finished running? If not is there a way that to Explicitly destroy all variables and objects, releasing memory, after the procedure has finished running?
Any general tips on minimising memory usage would also be very handy
Thanks in advance
Jon