SubCommand1_Click()
DimiAsInteger,nAsInteger
Fori=1To9
Forn=1Toi
Printn&"×"&i&"="&i*n&"";
Next
Print""
Next
EndSub晕,没看到你说的是ForEach...Next
修改如下:
SubCommand2_Click()
Dimi,n
arr=Array(1,2,3,4,5,6,7,8,9)
brr=Array(1,2,3,4,5,6,7,8,9)
ForEachiInarr
ForEachnInbrr
Ifn<=iThenPrintn&"×"&i&"="&i*n&"";
Next
Print""
Next
EndSub