VB,请问怎么优化这两段代码?谢谢! 已关闭
悬赏分:0
For aao = 0 To Form13.Text2.UBound If Form13.Text2(aao).Text <> "" Then zhonghexiao = CInt(Form13.Text2(0)) zhongheda = CInt(Form13.Text2(1)) zhishugeshu = CInt(Form13.Text2(2)): zhishugeshu1 = CInt(Form13.Text2(3)) Heshugeshu = CInt(Form13.Text2(4)): Heshugeshu1 = CInt(Form13.Text2(5)) jishugeshu = CInt(Form13.Text2(6)): jishugeshu1 = CInt(Form13.Text2(7)) oushugeshu = CInt(Form13.Text2(8)): oushugeshu1 = CInt(Form13.Text2(9)) End If Next aao Ha = Split(Text1(0).Text, " ", -1) For i = 0 To UBound(Ha) Hb = Split(Text1(1).Text, " ", -1) For j = 0 To UBound(Hb) hc = Split(Text1(2).Text, " ", -1) For K = 0 To UBound(hc) Hd = Split(Text1(3).Text, " ", -1) For l = 0 To UBound(Hd) he = Split(Text1(4).Text, " ", -1) For m = 0 To UBound(he) Hf = Split(Text1(5).Text, " ", -1) For n = 0 To UBound(Hf) If Ha(i) <> Hb(j) And Ha(i) <> hc(K) And Ha(i) <> Hd(l) And Ha(i) <> he(m) And Ha(i) <> Hf(n) Then If Hb(j) <> hc(K) And Hb(j) <> Hd(l) And Hb(j) <> he(m) And Hb(j) <> Hf(n) Then If hc(K) <> Hd(l) And hc(K) <> he(m) And hc(K) <> Hf(n) Then If Hd(l) <> he(m) And Hd(l) <> Hf(n) Then If he(m) <> Hf(n) Then Q = Ha(i) & " " & Hb(j) & " " & hc(K) & " " & Hd(l) & " " & he(m) & " " & Hf(n) & " " & hh(p) List1.AddItem Q End If End If End If End If End If Next n Next m Next l Next K Next j Next i Next p End If |