Tables("GS").sort = "BH"
Dim v0 As Integer = 1
For i As Integer = i - 9 To Tables("GS").Rows.count - 1
If i > Tables("GS").Rows.count - 10 Then
If (Tables("GS").Rows(i-1)("G0") + Tables("GS").Rows(i)("G0") ) Mod 2 = 0 Then
v0 = v0
Else
v0 = v0 + 1
End If
End If
Next
If v0 >= 6 Then
If Tables("GS").Rows(i)("G0") Mod 2 = 0 Then
If Tables("GS").Rows(i)("JH") Mod 2 = 0 Then
Output.Show("GO=" & "S")
Else
Output.Show("GO=" & "D")
End If
Else
If Tables("GS").Rows(i)("JH") Mod 2 = 0 Then
Output.Show("GO=" & "D")
Else
Output.Show("GO=" & "S")
End If
End If
Else
If Tables("GS").Rows(i)("G0") Mod 2 = 0 Then
If Tables("GS").Rows(i)("JH") Mod 2 = 0 Then
Output.Show("GO=" & "D")
Else
Output.Show("GO=" & "S")
End If
Else
If Tables("GS").Rows(i)("JH") Mod 2 = 0 Then
Output.Show("GO=" & "S")
Else
Output.Show("GO=" & "D")
End If
End If
End If
请问老师,如何将上面的两段代码连接起来,下面的代码要用到上面代码的v0值。
[此贴子已经被作者于2014-2-10 18:53:01编辑过]