Anyone know's how do i unload all the array Menu i have made ?
do i have to make a Loop to unload all Array Menu ?
Printable View
Anyone know's how do i unload all the array Menu i have made ?
do i have to make a Loop to unload all Array Menu ?
Here's how you kill a variable array;
Code:Erase VarArray ' Each element set to Empty.
this is what i did but doens't work !
Sub UnloadAllArray()
For b = 0 To mnuemail().Count - 1
Erase mnuemail(b)
Next
End Sub
But if you use the Erase syntax, you need to know the following 2 things:
If the Array is Fixed size, then the Erase will only reinitialize the Array but not release the memory.
Else the Array is a dynamic array then the entire memory is release.
Code:Dim MyArray1 (10) As String
Dim MyArray2 () As String
ReDim MyArray2(10)
Erase MyArray1 'Memory hold by the MyArray1 is not released.
Erase MyArray2 'Memory hold by the MyArray2 is relesed
Cheers!
[Edited by Chris on 01-04-2001 at 11:25 PM]