Delete VBA array content

There is an easy way to delete the contents of an array. Is possible by the command Erase

 

Option Explicit

Sub FeldBeispiel()

Dim fFeld(5, 5) As Integer

fFeld(3, 3) = 3

MsgBox fFeld(3, 3)

Erase fFeld

MsgBox fFeld(3, 3)

End Sub

Write a comment

Comments: 0