我正在尝试弄清如何从数组中删除特定位置的元素。我们还需要调整数组大小。为了使示例更简单,让我们尝试删除数组中位置一的任何颜色(“绿色”,“蓝色”,“红色”)。
Sub Example()
Dim pos
colors = Array("Green", "Blue", "Red")
pos = 1
colors(pos).Delete 'obviously this doesn't work but what would the correct protocol be?
End Sub