There are two types of array in VBA, Static array and Dynamic array.
Static array:
- Array is dimenstioned during design time.
- Array size can not be changed.
- By using erase function, only array element values in the memory will be emptied, elements memory will not be deleted.
- Memory is fixed during design time.
Dynamic array:
- Array is dimenstioned during runtime
- Array size can be changed (Shrink or Enlarge) any number of times.
- By using erase function, both array element values and elements memory will be deleted.
- We can utilise the memory efficiently.