'用Y() 替换 X() 中的元素
Dim x(2)
Dim y(2)
Dim a(2)
Dim count
x(0)=0
x(1)=1
x(2)=2
y(0)=7
y(1)=8
y(2)=9
For count = 0 To 2
x(count)=Replace (x(count),x(count),y(count))
MsgBox x(count)
Next
Dim x(2)
Dim y(2)
Dim a(2)
Dim count
x(0)=0
x(1)=1
x(2)=2
y(0)=7
y(1)=8
y(2)=9
For count = 0 To 2
x(count)=Replace (x(count),x(count),y(count))
MsgBox x(count)
Next