高手们,打扰一下,EXCEL高手用VBA解释一下FOR循环数组AI输?
sub subp(b() as integer)for i=1 to 4
b(i)=2*i
next i
end sub
private sub command1_click()
dim a(1 to 4) as integer
a(1)=5
a(2)=6
a(3)=7
a(4)=8
subp a()
print a(i)
for i=1 to 4
print a(i)
next i
end sub
结果为(A)
A,2
4
6
8
B,5
6
7
8
C,10
12
14
16
D,出错
书本上答案A,编译出错,这个究竟哪里错了请指导