Erasing Arrays : Array Erase « Data Type « VBA / Excel / Access / Word






Erasing Arrays

 

Sub arrayTest4()
     Dim i As Integer
     Dim intMyScores() As Integer
     Dim intArraySize As Integer
    
     intArraySize = 10
    
     ReDim intMyScores(1 To intArraySize)
    
     For i = 1 To intArraySize
        intMyScores(i) = i
     Next
    
     For i = 1 To intArraySize
        Debug.Print "For array element " & i & " the number is " & intMyScores(i)
     Next
     Erase intMyScores
End Sub

 








Related examples in the same category

1.Removing Data from an Array