Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
free up memory by deleting variables
I have tons of variables in my VBA code and need to delete some of the when they're no longer needed. What's the code for that? Fo example, how do I delete myarray(13,18)? Thanks ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
free up memory by deleting variables
To clear an array use: ERASE
Erase myarray(13, 18) HTH -----Original Message----- I have tons of variables in my VBA code and need to delete some of them when they're no longer needed. What's the code for that? For example, how do I delete myarray(13,18)? Thanks! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
free up memory by deleting variables
If it is dynamic, then
erase myarray if it is a variant variable containing an array myArray = "" Otherwise I believe you would have to go out of scope. -- Regards, Tom Ogilvy "clui" wrote in message ... I have tons of variables in my VBA code and need to delete some of them when they're no longer needed. What's the code for that? For example, how do I delete myarray(13,18)? Thanks! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
free up memory by deleting variables
Just to add,
That doesn't free up any memory if the array is not dynamic. from help for Erase: Reinitializes the elements of fixed-size arrays and releases dynamic-array storage space. -- Regards, Tom Ogilvy pk wrote in message ... To clear an array use: ERASE Erase myarray(13, 18) HTH -----Original Message----- I have tons of variables in my VBA code and need to delete some of them when they're no longer needed. What's the code for that? For example, how do I delete myarray(13,18)? Thanks! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
free up memory by deleting variables
Tom,
Any guidance on using Erase (like Set Object = Nothing)? I had assumed a program will release the memory when it completes. Alex J "Tom Ogilvy" wrote in message ... Just to add, That doesn't free up any memory if the array is not dynamic. from help for Erase: Reinitializes the elements of fixed-size arrays and releases dynamic-array storage space. -- Regards, Tom Ogilvy pk wrote in message ... To clear an array use: ERASE Erase myarray(13, 18) HTH -----Original Message----- I have tons of variables in my VBA code and need to delete some of them when they're no longer needed. What's the code for that? For example, how do I delete myarray(13,18)? Thanks! ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Repayment of loan excel sheet with variables of principal free pay | Excel Worksheet Functions | |||
EARN,20000$ & ALL TYPES SOFTWARE FREE DOWNLOAD,& KATRINA KAIF OPENVIDEOS & WEBSITE DEV TO FREE ALL OVER THE WORLD`S PEOPLE | Excel Worksheet Functions | |||
Free social world wide network pays for 10 generations! Free! | Excel Discussion (Misc queries) | |||
Where free 2 sigma statistical process control chart, free? | Charts and Charting in Excel | |||
Free old variables | Excel Discussion (Misc queries) |