Private Sub view()
If MsgBox(“小伴侣,请持续要加油呀!!你实的要从头出题吗?“, vbYesNo, “一年级数学操练“) = vbNo Then Exit Sub
’+填写被加数和加数
Range(“E2“).Select
Selection.ClearContents
Range(“C3“).Select
Selection.ClearContents
’-填写被加数和加数
Range(“J2“).Select
Selection.ClearContents
Range(“H3“).Select
Selection.ClearContents
’+填写被加数和加数
Range(“C8“).Select
Selection.ClearContents
Range(“E9“).Select
Selection.ClearContents
’-填写被加数和加数
Range(“H8“).Select
Selection.ClearContents
Range(“J9“).Select
Selection.ClearContents
’+填写被加数和加数
Range(“C17“).Select
Selection.ClearContents
Range(“E17“).Select
Selection.ClearContents
’-填写被加数和加数
Range(“H17“).Select
Selection.ClearContents
Range(“J17“).Select
Selection.ClearContents
’----------以上为肃清旧数字----------
Dim x1, x2
’1 -- +
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
If Len(x1) = 2 Then Range(“C2“).Value = Left(x1, 1)
Range(“E3“).Value = Right(x2, 1)
If Len(x1 + x2) = 2 Then Range(“C5“).Value = Left(x1 + x2, 1)
Range(“E5“).Value = Right(x1 + x2, 1)
’2 -- +
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
Range(“E8“).Value = Right(x1, 1)
Range(“C9“).Value = Left(x2, 1)
Range(“C11“).Value = Left(x1 + x2, 1)
Range(“E11“).Value = Right(x1 + x2, 1)
’3 -- +
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
If Len(x1) = 2 Then Range(“C14“).Value = Left(x1, 1)
Range(“E14“).Value = Right(x1, 1)
If Len(x2) = 2 Then Range(“C15“).Value = Left(x2, 1)
Range(“E15“).Value = Right(x2, 1)
’1 -- -
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
If Len(x1 + x2) = 2 Then Range(“H2“).Value = Left(x1 + x2, 1)
Range(“J3“).Value = Right(x1, 1)
If Len(x2) = 2 Then Range(“H5“).Value = Left(x2, 1)
Range(“J5“).Value = Right(x2, 1)
’2 -- -
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
If Len(x1 + x2) = 2 Then Range(“J8“).Value = Right(x1 + x2, 1)
Range(“H11“).Value = Left(x2, 1)
Range(“J11“).Value = Right(x2, 1)
’3 -- -
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
If Len(x1 + x2) = 2 Then Range(“H14“).Value = Left(x1 + x2, 1)
Range(“J14“).Value = Right(1 + x2, 1)
If Len(x1) = 2 Then Range(“H15“).Value = Left(x1, 1)
Range(“J15“).Value = Right(x1, 1)
’==========以上为==========
Range(“O2“).Select
Selection.ClearContents
Range(“M5“).Select
Selection.ClearContents
Range(“O8“).Select
Selection.ClearContents
Range(“M11“).Select
Selection.ClearContents
’1 -- +
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
Range(“M2“).Value = x1
Range(“Q2“).Value = x1 + x2
’2 -- +
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
Range(“O5“).Value = x1
Range(“Q5“).Value = x1 + x2
’1 -- -
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
Range(“Q8“).Value = x1
Range(“M8“).Value = x1 + x2
’2 -- -
x1 = Int(Rnd * 50)
x2 = Int(Rnd * 49)
Range(“O11“).Value = x1
Range(“Q11“).Value = x2
Range(“E2“).Select
End Sub