'为了7楼的吹牛说10行内完成,就再优化了一下代码,共9行可达到目的
Private Sub Command1_Click()
Dim l As Long, a As Integer
l = 9 - ((Val(Combo1) * 12 + Val(Combo2) - 3) Mod 9)
For i = 0 To 8
a = l + i
If a > 9 Then a = a - 9
y(i).Caption = a
Next
End Sub
Private Sub Command1_Click()
Dim l As Long, a As Integer
l = 9 - ((Val(Combo1) * 12 + Val(Combo2) - 3) Mod 9)
For i = 0 To 8
a = l + i
If a > 9 Then a = a - 9
y(i).Caption = a
Next
End Sub