两个按钮的代码如下:
Private Sub C1_Click()
Dim b As Integer
b = 15000
Do While isprime(b) = False
b = b + 1
Loop
Text1.Text = b
End Sub
Private Sub C2_Click()
Open App.Path & "\out5.txt" For Output As #1
Print #1, Text1.Text
Close #1
End Sub