假如我代码是这样的:
If page = 1 then
Message(1) = "&H" & combo1(0).ListIndex
Message(2) = "&H" & combo2(0).ListIndex
Message(3) = "&H" & combo3(0).ListIndex
Message(4) = "&H" & combo4(0).ListIndex
Message(5) = "&H" & combo5(0).ListIndex
Message(6) = "&H" & combo6(0).ListIndex
ElseIf page = 2 then
Message(1) = "&H" & combo1(0).ListIndex
Message(2) = "&H" & combo2(0).ListIndex
Message(3) = "&H" & combo3(0).ListIndex
Message(4) = "&H" & combo4(0).ListIndex
Message(5) = "&H" & combo5(0).ListIndex
Message(6) = "&H" & combo6(0).ListIndex
Message(7) = "&H" & combo1(1).ListIndex
Message(8) = "&H" & combo2(1).ListIndex
Message(9) = "&H" & combo3(1).ListIndex
Message(10) = "&H" & combo4(1).ListIndex
Message(11) = "&H" & combo5(1).ListIndex
Message(12) = "&H" & combo6(1).ListIndex
ElseIf page = 3 then
Message(1) = "&H" & combo1(0).ListIndex
Message(2) = "&H" & combo2(0).ListIndex
Message(3) = "&H" & combo3(0).ListIndex
Message(4) = "&H" & combo4(0).ListIndex
Message(5) = "&H" & combo5(0).ListIndex
Message(6) = "&H" & combo6(0).ListIndex
Message(7) = "&H" & combo1(1).ListIndex
Message(8) = "&H" & combo2(1).ListIndex
Message(9) = "&H" & combo3(1).ListIndex
Message(10) = "&H" & combo4(1).ListIndex
Message(11) = "&H" & combo5(1).ListIndex
Message(12) = "&H" & combo6(1).ListIndex
Message(13) = "&H" & combo1(2).ListIndex
Message(14) = "&H" & combo2(2).ListIndex
Message(15) = "&H" & combo3(2).ListIndex
Message(16) = "&H" & combo4(2).ListIndex
Message(17) = "&H" & combo5(2).ListIndex
Message(18) = "&H" & combo6(2).ListIndex
ElseIf page = 4 then
...
ElseIf page = 150 then
End If
请教高手,如果这样写肯定是个愚蠢的方法,要如何写一个循环表示上面的意思?谢谢!
[此贴子已经被作者于2007-4-14 11:32:09编辑过]